Javascript Tutorial | Functions, First Class Citizens or Callable Objects | Ep18

preview_player
Показать описание
Functions in Javascript are treated as first class citizens or callable objects. In other words they are objects. A standard object's context is made up of properties and methods. However callable objects have an executable context made up of a list of instructions to run on the computer.

Just like objects, callable objects can be placed within a variable, constant or even a parameter. Yes you can even pass a function to another function if you wish.

Рекомендации по теме
Комментарии
Автор

I have seen a lot of tutorials but honestly, this is the best tutorial I've seen so far thanks.

armyofone
Автор

Had a quick run thorough the whole thing. Well done man. Keep up the good work :)

vimal
Автор

@Avelex I am not sure why we need to pass the "fullName" to: return concact(fullName);
I know that the console will throw back "Mr.undefined" at me, but why is that?
What I am trying to say is that I fail to understand why return "Mr." + name; in the "concact function" is not sufficient to the return the real full name based on it? I hope I expressed my self somewhat coherently.
Appreciate your attention.

groovysalmon
Автор

watch from 6:30 to get a rundown of how the code would be executed

dayhaysuper
Автор

when I call name, I get this error: "name is not a function"

sergerudasingwa