First class function or first class citizen in JavaScript. But what are first class in general, According to wikipedia A first-class citizen (also type, object, entity, or value) in a given programming language is an entity which supports all the operations generally available to other entities Source First class function are treated like variables. Variables are assigned values. They are passed as an […]
Tag: functions
In the past whenever I came across code snippets with the usage of call() and apply(). I would ignore them as they appeared to be on advanced level. It was scary for me, as any new thing is. Than I found this code snippet function add(){ console.log(arguments) //Arguments { 0: 1, 1: 2, 2: 3, […]