JavaScript Interview Prep: Functions, Closures, Currying

JavaScript Interview Prep: Functions, Closures, Currying

freeCodeCamp.org

1 год назад

136,336 Просмотров

Prepare for JavaScript interview questions focusing on closures, functions, and currying. Throughout the course, you'll delve into various aspects of JavaScript, such as function declarations, expressions, scopes, and hoisting, as well as learning about advanced concepts like closures and lexical scope. You'll also gain a deeper understanding of currying and its practical applications in JavaScript.

Course created by @RoadsideCoder

Useful Links mentioned in the video -
🎥 var, let and const Video - https://www.youtube.com/watch?v=oUWRxJ19gfE&list=PLKhlp2qtUcSaCVJEt4ogEFs6I41pNnMU5
🎥 map, filter, and reduce Video - https://www.youtube.com/watch?v=dGq0gi0wv64&list=PLKhlp2qtUcSaCVJEt4ogEFs6I41pNnMU5&index=2
🎥 FE Interview Experience Video - https://www.youtube.com/watch?v=vxggZffOqek&list=PLKhlp2qtUcSb_WQZC3sq9Vw3NC4DbreUL&index=1

⭐️ Contents ⭐️
⌨️ (0:00:00) Intro
⌨️ (0:01:48) Function Declaration
⌨️ (0:02:13) Function Expression
⌨️ (0:02:34) Anonymous Function
⌨️ (0:03:25) First Class Functions
⌨️ (0:04:54) What is IIFE?
⌨️ (0:06:05) IIFE - Interview Question
⌨️ (0:06:59) Closures
⌨️ (0:07:27) Function Scopes
⌨️ (0:09:10) Function Scope - Interview Question
⌨️ (0:10:18) Hoisting in Functions
⌨️ (0:13:40) Hoisting - Interview Question
⌨️ (0:15:46) Params vs Arguments
⌨️ (0:16:25) Spread vs Rest Operators
⌨️ (0:17:43) Interview Question on params, args, spread, rest
⌨️ (0:19:03) Callback Function
⌨️ (0:20:02) Callback Function - Interview Questions
⌨️ (0:20:58) Arrow Functions
⌨️ (0:21:59) Arrow function vs Normal Function
⌨️ (0:25:13) Closures
⌨️ (0:25:50) What is Lexical Scope?
⌨️ (0:27:39) Lexical Scope - Interview Question
⌨️ (0:28:53) What is Closure?
⌨️ (0:29:44) Example of Closures
⌨️ (0:30:57) Why Closure?
⌨️ (0:32:20) Closure Scope Chain
⌨️ (0:35:13) Ques 1 - What will it print?
⌨️ (0:37:10) Ques 2 - Write a function for this
⌨️ (0:39:29) Ques 3 - Time Optimisation with Closures
⌨️ (0:42:08) Ques 4 - setTimeout + block scope with Closures
⌨️ (0:47:08) Ques 5 - Create a private counter
⌨️ (0:49:49) Ques 6 - What is Module Pattern?
⌨️ (0:51:40) Ques 7 - Make this run only once
⌨️ (0:54:18) Ques 8 - Once Polyfill Implementation
⌨️ (0:58:11) Ques 9 - Memoise/Caching Implementation
⌨️ (1:03:46) Ques 10 - Closure vs Scope
⌨️ (1:04:25) Currying
⌨️ (1:04:55) What is Curring in Javascript?
⌨️ (1:05:23) Example of Currying
⌨️ (1:08:17) Ques 1 - Implement sum(2)(6)(1)
⌨️ (1:11:02) Ques 2 - Reusing Variable for logic
⌨️ (1:14:09) Ques 3 - Infinite Currying
⌨️ (1:18:27) Ques 4 - Currying vs Partial Application
⌨️ (1:20:37) Ques 5 - Manipulating DOM
⌨️ (1:23:01) Ques 6 - curry() implementation
Ссылки и html тэги не поддерживаются


Комментарии:

Abhishek Mohanty
Abhishek Mohanty - 01.10.2023 15:31

Thanks a lot man, I had watched this video a day before my interview and some of the interview questions were exactly the same , and I was able to successfully clear the interview in a really good product based company 😊

Ответить
Mayur Mahajan
Mayur Mahajan - 21.09.2023 17:42

Bro literally saved my life today, I watched this video before the interview, It went excellent.

Ответить
Ichirou Takashima
Ichirou Takashima - 21.07.2023 14:32

Was I simply too afraid? Should I start applying? Are these really expected interview questions for entry level?

Ответить
ZHONGHE ZHENG
ZHONGHE ZHENG - 14.07.2023 11:01

the manipulating DOM example does not seem to be of using currying, but more of using closure to store value of id.

Ответить
Billy Cris
Billy Cris - 29.06.2023 15:59

I understood nothing

Ответить
sudhir kalivarapu
sudhir kalivarapu - 23.05.2023 07:01

Can a value can be shared between sibling functions in a function in closures

Ответить
nick@reaper
nick@reaper - 17.05.2023 07:32

Ответить
pitlord
pitlord - 09.05.2023 15:52

this closure thingy is huge stuff I just discovered today, thank you!

Ответить
MrDarkDayy
MrDarkDayy - 07.05.2023 16:58

You know the tutorial is going to be superior than others when the guy is Indian.

Ответить
Lone Wolf Coding Professional
Lone Wolf Coding Professional - 02.05.2023 13:23

the infinite currying is like recursion

Ответить
Natalia Iv
Natalia Iv - 01.05.2023 10:00

Thank you so much for this video! Waiting for "this" video 😉

Ответить
Aimene Harbi
Aimene Harbi - 28.04.2023 04:29

We need dart language

Ответить
Joseph Lee
Joseph Lee - 26.04.2023 16:27

The stock market's dividends motivated me to start investing. What counts, in my opinion, is that you will be able to live off of dividends without selling if you invest and make more money in addition to payouts. It suggests that you can give your children that advantage, giving them a head start in life. I've invested more than $600k throughout the years in dividend stocks; I'm still buying more today and will keep doing so until the price drops even further.

Ответить
NoHorizon
NoHorizon - 25.04.2023 00:40

How did he move square() to console log? I mean what is she shortcut?

Ответить
genacator
genacator - 23.04.2023 23:41

Love the part on closures.

Ответить
Y A
Y A - 22.04.2023 17:58

Referenceerror: function not working

Ответить
No Shards
No Shards - 22.04.2023 10:28

CURRYing

Ответить
ankit kumar
ankit kumar - 22.04.2023 08:00

you were always referring to another video for another concept this video could have been good if all concepts were clear at the same time

Ответить
mono troupe
mono troupe - 21.04.2023 12:41

Java interview prep next😊

Ответить
Água Rosada
Água Rosada - 21.04.2023 11:19

thanks for this content will help me !

Ответить
Alexander Komanov
Alexander Komanov - 21.04.2023 10:17

Thanks!

Ответить
i u
i u - 21.04.2023 10:05

I do like the way you explained it, and tried to keep the code simple and minimalistic to avoid confusion. This especially helps when you are exploring a complex concept. Apart from once function I was almost able to understand all, also in one go with small breaks,so the video was interesting enough to keep me attentive including some minor drink and stretch breaks. This is indeed a great valued content worth every single second of my watchtime but hey, we don't count in seconds , right? :)
TLDR : Great content. Good luck for future ones, and this one helped a lot.

Ответить
Anna Lan
Anna Lan - 21.04.2023 09:45

Could I cooperate with you on promotional video about software? Thanks

Ответить
Christian Fredrick
Christian Fredrick - 21.04.2023 06:47

Investing in crypto now should be in every wise individuals list, in some months time you'll be ecstatic with the decision you made today. 🥇

Ответить
Suplays
Suplays - 21.04.2023 05:22

Im already subscribed to his channel and love his content. ❤

Ответить
princess_maya
princess_maya - 21.04.2023 02:42

There's a joke somewhere to be made here about currying lol

Ответить
Sümeyye A
Sümeyye A - 20.04.2023 22:28

that's what i was waiting for 🏆 plss release more videos related to interview

Ответить
Impulse Imp
Impulse Imp - 20.04.2023 20:56

Dond dell me whad uoo duooo please 😅

Ответить
GAGAN DEEP SINGH
GAGAN DEEP SINGH - 20.04.2023 20:45

This questions is very good for entry level js coding interview

Ответить
דוד אלאלוף בלקמן
דוד אלאלוף בלקמן - 20.04.2023 20:19

תודה!

Ответить
A Ms
A Ms - 20.04.2023 20:08

Why do you need to yell? Do you think we are deaf?

Ответить
Lavish Handa
Lavish Handa - 20.04.2023 18:51

absolutely best timing, I have an interview tomorrow. thanks FCC !

Ответить
imranist
imranist - 20.04.2023 18:28

Great❤

Ответить
WB
WB - 20.04.2023 18:27

hehe

Ответить
Lone Wolf Coding Professional
Lone Wolf Coding Professional - 20.04.2023 18:23

i like the methods using shorthand syntax
its like making your naming of functions more reusable

Ответить
MadHouseNetwork
MadHouseNetwork - 20.04.2023 18:19

Came in good time

Ответить
Josh C
Josh C - 20.04.2023 17:46

Definitely needed this

Ответить
Ivailo Netzov
Ivailo Netzov - 20.04.2023 17:44

Do a java job prep

Ответить
tejas ukalkar
tejas ukalkar - 20.04.2023 17:38

I've interview tomorrow and this video came as blessing in disguise for me thank you @freecodecamp😊😊❤❤

Ответить
rba1aji
rba1aji - 20.04.2023 17:36

bruh

Ответить
Narin Kotsuwan ONLINE BUSINESS Microsoftโดยเจ้าของ
Narin Kotsuwan ONLINE BUSINESS Microsoftโดยเจ้าของ - 20.04.2023 17:34

สวัสดีค่ะขอบคุณค่ะ❤😂🎉😢😮😅😊

Ответить
Narin Kotsuwan ONLINE BUSINESS Microsoftโดยเจ้าของ
Narin Kotsuwan ONLINE BUSINESS Microsoftโดยเจ้าของ - 20.04.2023 17:34

สวัสดีค่ะขอบคุณค่ะ❤😂🎉😢😮😅😊

Ответить
Dij
Dij - 20.04.2023 17:26

Thanks for this! I'm saving this for when I'm ready for interviews.

Ответить