Functions
Functions ,Just like in other programming languages, is a piece of code which performs an action that can be used repeatedly.
Here main
is a function
Macros
Macros are built in functions that help you do specific tasks
Here println
is a macro - we can identify macros with !
sign after macro name.
println! vs print!
println!
macro adds a new line to the output but !print
doesn’t.
So println!
is prefered over !print