JavaScript Interview Prep: Functions, Closures, Currying
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