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!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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!