FIRST CLASS FUNCTIONS 🔥ft. Anonymous Functions | Namaste JavaScript Ep. 13

preview_player
Показать описание
Functions in JS are first-class Citizens, what does that mean? What is the difference between Function Statements and Function Expressions? What are Anonymous Functions? What are First Class Functions? What is the difference between Function Parameter and Function Arguments?

These are just `Jargons` which are very popular in the JS community, so don't worry let's study everything in sweet and short 20 minutes power-packed JS tutorial video. I've also shared my interview experience and how the interviewer asked me these questions. So, watch this exciting video, I bet you'll love it. ❤️

If you are giving web developer interviews actively, there are high chances that you might find these questions in your front-end developer interview. Candidates have faced these questions in their interviews for Amazon, Facebook, Paypal, Microsoft, and many other big tech firms.

The only request is to watch this Episode of Namaste JavaScript with full attention. 🙏

Timestamps:
00:00 - Introduction - My Interview Experience
02:00 - What is a Function Statement in JS
02:42 - What is a Function Expression
04:04 - Difference between Function Statment and Function Expression
06:00 - What is a Function Declaration
06:18 - What is an Anonymous Function in JavaScript
06:29 - Syntax Error & Anonymous functions
07:32 - Use/ Advantages of Anonymous Functions
09:28 - What are Named Function Expressions in JS
10:10 - Corner Case Gotcha using Named Function Expression
12:03 - What is the difference between Parameters & Arguments?
16:13 - First-Class Functions in JavaScript
17:27 - Functions are First-Class Citizens
19:58 - Info about Arrow Functions
21:46 - Teaser of the next video
21:58 - Thank you for watching Namaste JavaScript 🙏

Support this video series, NOT BY MONEY, but by sharing it with your friends. 🙏
I'll give my best to come up with great content and everything absolutely for free on YouTube. 😊

If you are active on Social Media,
please give a shoutout to Namaste JavaScript and help me reach more people. 🙏

Cheers,
Akshay Saini

Would love to Stay Connected with you ❤️

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

How was this video? Let me know in the comments below, I read each and every comment! ❤️

akshaymarch
Автор

Things learned:
1. What is Function Statement ?
A. A normal function that we create using Naming convention. & By this we can do the Hoisting.
For Ex - function xyz(){
console.log("Function Statement");
}

2. What is Function Expression ?
A. When we assign a function into a variable that is Function Expression. & We can not do Hoisting by this becz it acts like variable.
For Ex - var a = function(){
console.log("Function Expression");
}

3. What is Anonymous Function ?
A. A Function without the name is known as Anonymous Function. & It is used in a place where function are treated as value.
For Ex - function(){
}

4. What is Named Function Expression ?
A. A function with a name is known as Named Function Expression.
For Ex - var a = function xyx(){
console.log("Names Function Expression");
}

5. Difference b/w Parameters and Arguments ?
A. When we creating a function & put some variabels in this ( ) that is our Parameters.
For Ex - function ab( param1, param2 ){
console.log("
}
& When we call this function & pass a variabel in this ( ) that is our Arguments
For Ex - ab( 4, 5 );

6. What is First Class Function Or First class citizens?
A. The Ability of use function as value,
* Can be passed as an Argument,
* Can be executed inside a closured function &
* Can be taken as return form.
For Ex - var b = function(param){
return function xyz(){
console.log(" F C F ");
}
}

7. Function are heart of JS. They are called first class citizens or first class functions because they have the ability to be stored in the variables, passed as parameters and arguments. They can also be returned in the function.

AmanMishra-pncq
Автор

akshay bhaiya confused in interview.
My ans would be at that point:
Every function is beautiful, either it is function expression or it is function statement. 😂😂
love you bhaiya❤️❤️

suman-majhi
Автор

I'm addicted to this series! Watching even in office hours, after office hours, all the time.

aditisharma
Автор

Words cannot express how much I love this series.

AnaRamirez-ngtj
Автор

This is the first time I binged watched a course and It is really exciting.
Feels like you are revealing the story of JavaScript.
Eagerly waiting for the next episode

GauravSharma-icrd
Автор

Again.... And again....
I can't stop saying that it is the most beautiful JS course 🤗🤗

anshsharma
Автор

Your greatness is accepting your failures and learning from them. If that interviewer was watching this video, she must feel proud of you.

anitasunildesai
Автор

The interview startup's name rhymes with "Tomato"

For Revision
Function statement / Function Declaration : the function is normally defined and can be used later on
Function expression : the function is first created and assigned to a variable so that it can be called by its variable name and unless it is defined, it cannot be executed otherwise it throws out "Uncaught TypeError"

Anonymous function : function where there is no need to define name for the function, it just can be assigned to variable

Named function : Normal function with its name assigned to a variable !!In this case you cannot call function by its name in outer scope!! (Scope Chain)

first class Functions / first class citizens :
1) used as values
2) can be passed as argument
3) can be executed inside a closured function
4) can be taken as return

xFOXHOUND
Автор

I love how akshay didn't do so well at the interview. but he kept pushing forward. he went home and learned everything he needs to know. Now he's so knowledgeable that he's able to teach thousands of people how to also become programmers... #sucessStory

novanoskillz
Автор

I've been watching these videos for last 3 days and these are simply awesome and better than many paid courses where the method of teaching is monotonous. These are simply awesome!

aroundtheglobeSwati
Автор

Nobody could have explained it better. Just a suggestion: Please upload frequently so that more topics can be covered soon. To be honest, we always wait for your new and exciting videos.

anamikayadav
Автор

the goat the absolute goat on youtube!! no one teaches better then this guy sir!!! huge respect to you bhai!! love you!!

I wish i could have found your channel in my college time!! massive huge love n respect!

AsadKhan-ittw
Автор

What did I learn from this video?
1. Functions are very beautiful in Javascript.
2. Functions are heart of javascript.
3. He Loves functions.

abhisheksinghrajput
Автор

I had encounter once "First class citizen" in a js book, but i get to know the real meaning of it after watching this video. Thanks #Akshay for explaining this in so simple terms

kirtimittal
Автор

How, HOW did you manage to in one series nail so many (important) aspects & make them so clear; This is much of the stuff that's "hidden" in the "Advanced" section of the MDN documentation.

awesome!

chromashift
Автор

Functions are very beautiful in JavaScript. Its heart of JavaScript

Rachana
Автор

Namaste Javascript is one of the best thing that has started in 2020 :D

harshithvenkatesh
Автор

Many were said the JavaScript is beautiful but they didn't project as beautiful. But if you said it is beautiful you make it beautiful.... JS Guru.

SrinubabuRavilla
Автор

Kudos to your abilities to explain things so clearly! I am addicted and learning a lot! Plus your extra entertainment factor keeps your viewers engaged☺️

justasimplegal