Functions are at the core of what we do in JavaScript so it's essential that we understand what they do and how they work. But what exactly are fun...
For further actions, you may consider blocking this person and/or reporting abuse
Great post!
"If there is no function body then your function will return as undefined."
This statement takes us further to passing a function as a value to a variable.
console.log(isNigerian (Ayobami));
function isNigerian(person){
return // Boolean
}
Will work but the below will not.
console.log(isNigerian(Ayobami));
const isNigerian = function(person){
return // boolean
}// isNigerian is not a function
Will not work because a function passed to a variable in JavaScript will be hoisted but you cannot access it until JS execution gets to its definition
Thank you! And thanks for the addition!
? When you wrote:Here I'm passing in 'Kara' as our parameter. Should it not be called an argument as you wrote above. (what goes inside the parentheses) while arguments are the values the function receives from each parameter when the function is executed. Just trying to understand.
Ah yes! Thank you for catching that. I’ll get it updated.
Nice job :)
Thanks for that. This makes it very clear.
I see you’re a music publicist.... I used to work for Rondor publishing a lifetime ago. Always loved my visits to Nashville.
That’s awesome! Nashville is a great town - it’s grown a ton!
Great post! Especially pointing out argument versus parameters.
Thank you!