• The questions covered here are mostly conceptual
• I never claim only these type of questions are/should be asked during interviews
• For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
Series: 3️⃣
Level: Beginner
Topics:
1️⃣ Functions - Basics
2️⃣ Function Scope
3️⃣ Function Arguments
4️⃣ Anonymous Functions
5️⃣ Higher Order Function & Callbacks
6️⃣ Closure
7️⃣ IIFE
8️⃣ Arrow Functions
1️⃣ Functions - Basics
✪ Can a function name be used like a normal variable?
✪ What is the difference between evaluating "myFunction" and "myFunction()"?
✪ Does every function in JS return something even if not explicitly stated? If yes, what does it return by default?
2️⃣ Function Scope
✪ What is a function scope?
✪ How does hoisting work inside a function body?
✪ Among var, let and const, which one does support hoisting?
3️⃣ Function Arguments
✪ What is the difference between function parameters and function arguments?
✪ What is "arguments" reference inside a function body? What purpose does it solve?
✪ Is "arguments" an array? Explain its behaviour.
✪ What is a "Variadic Function"?
✪ What are different ways to access variable number of arguments passed to a function inside its body?
✪ What is a rest parameter operator? How does it work inside function's parameters?
✪ Define some valid and invalid use cases of rest parameter?
✪ Define significant differences between "arguments" and "a rest parameter".
4️⃣ Anonymous Functions
✪ What are different ways of defining a function?
✪ What is an anonymous function?
✪ Where will an anonymous function be useful?
✪ What is the difference between "function a() {}" and "let a = function() {}"?
✪ Are all JavaScript functions hoisted?
5️⃣ Higher Order Function & Callbacks
✪ What is a callback function?
✪ Highlight some use cases for callback functions?
✪ Mention few in-build functions that accept a callback.
✪ What is a higher order function (HOF)?
6️⃣ Closure
✪ Define what is a closure.
✪ When does JavaScript create a closure?
✪ What is a lexical scope?
✪ Define various scopes within a closure.
✪ Why do you think closure is useful?
✪ Highlight few disadvantages of closures.
7️⃣ IIFE
✪ What is IIFE?
✪ Highlight some use cases of IIFE.
✪ The usage of IIFE has been reduced. Why? What are its alternatives?
8️⃣ Arrow Functions
✪ What is an arrow function?
✪ Which ES version introduced arrow function?
✪ Given a normal function, convert it into an arrow function.
✪ When is it not mandatory to include arguments inside ( and ) in an arrow function?
✪ When does an arrow function return implicitly even if no return keyword is specified?
✪ What are some key differences between a normal and an arrow function?
The next 🧵 of this series will provide questions from
1️⃣ Array
2️⃣ String
I am sharing "Interview Questions" for few other subjects. Find all of them 👇
💙 Spread and Rest Parameter Operators (...) in JavaScript
Follow this 🧵 for the easiest and never-to-forget type explanation. Thank me later 😝
Happy Weekend 👋
👇👇👇
🤷♀️ What is the need? [The Background]
We all know that an array is a collection of elements "kept together" in memory in a contiguous manner so that we can easily access any element using an index.
⇨ As all elements were kept together, how can we break those apart?
🤷♀️ Why does an array need to be broken apart?
If elements of an array are going to be "treated separately", you have to take all them out. Let's take an example.
🤷♀️ Problem: Print all elements in an array separately.
✅ Solution:
Data Structures & Algorithms (DSA) Interview Questions
⇩
Disclaimer:
• The questions covered here are mostly conceptual
• I never claim only these type of questions are/should be asked during interviews
• For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
Series: 1️⃣
Level: Beginner
Topics:
1️⃣ Algorithms
2️⃣ Data Structures
3️⃣ Array
4️⃣ Array-Algorithms
✪ I am Swapna from India 🇮🇳
✪ I had 10+ years of Experience
✪ I was a Software Architect
✪ I quit job in 2016 for health issues
✪ I am now a Tech Educator
✪ I will soon have my Blog, Portfolio and YT Channel