JavaScript
JavaScript
Function Declaration:
Anonimous function:
Because JS reads all the script before runs the script we can call a function before declare it
using function declaration (Hoisting)
"It already knows that I have a declared function after I call it"
// Variables
let name = "lucas"
// Methods & Functions
function callName () {
console.log(name)
}
// Inits & Event Listeners
callName()
Arrow Functions:
// a traditional function
let addTraditional = function (num1, num2){
num1 + num2;
console.log(add(3,4))
}