🤷‍♀️ JavaScript Interview Questions (Series 3)

👉 A detailed coverage on functions

👇
Before proceeding, do check the previous one of this series 👇

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: 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 👇

Are you interested in SQL? 👇 is an introductory to SQL commands. Do check and if found useful, please support.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Swapna Kumar Panda ✨

Swapna Kumar Panda ✨ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @swapnakpanda

14 Nov
📚 Books you must read for

⇨ DSA
⇨ SQL
⇨ JavaScript

Books were and still are the most important medium for our knowledge growth.

Do you love to read books? How about for technical subjects? If no, I would suggest you should.

Here, I will list few of my favourite ones. If you want to add any, feel free.
1️⃣ DSA

1️⃣ Grokking Algorithms
Author: Aditya Bhargava

2️⃣ Introduction to Algorithms
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein

3️⃣ Introduction to Algorithms
Author: Udi Manber

4️⃣ The Algorithm Design Manual
Author: Steven S. Skiena
Read 11 tweets
13 Nov
Introduction to SQL Commands and their Categorisation

Topics to be covered:

0️⃣ Introduction
1️⃣ DDL
2️⃣ DML
3️⃣ DQL
4️⃣ DCL
5️⃣ TCL
6️⃣ Final Words
0️⃣ Introduction

✪ SQL stands for Structured Query Language.

✪ SQL is a computer language for storing, manipulating and retrieving data stored in a relational database.

✪ SQL uses certain commands to carry out the required task.
Read 16 tweets
12 Nov
💙 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:

✪ If size is 1.
⇨ console.log(a[0])
Read 17 tweets
12 Nov
👉Interview Questions👈

🕸 Python 🐍 : Series 2

Series: 2️⃣
Level: Beginner
Topics:

1️⃣ Operators
2️⃣ Arithmetic Operators
3️⃣ Logical Operators
4️⃣ Comparison Operators
5️⃣ Assignment Operators
6️⃣ Operators Precedence
7️⃣ Operators Associativity
8️⃣ Operator Overloading
Before proceeding, do check the first one of this series👇

Read 16 tweets
11 Nov
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
Read 14 tweets
10 Nov
Hey 👋

I have been working hard to consistently provide you the best possible contents on

🕸 Interview Questions
🕸 DSA
🕸 JavaScript through Infographics
🕸 Python+JS

More to come in future. Don't wanna miss out?

✅ Follow @swapnakpanda
🔔 Turn on Notifications

Details 👇
0️⃣ Who am I?

✪ 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

For what have I posted in Twitter so far, see 👇
1️⃣ Interview Questions

You all love em right? Here are those

✪ DSA
✪ JavaScript
✪ Python
✪ SQL
✪ React
✪ GIT
✪ HTML/CSS
✪ NoSQL
✪ Java
✪ OOPs & Design Patterns
✪ Machine Learning (ML)
✪ Networking

All threads are organised at one place. 👇

twitter.com/i/events/14559…
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Thank you for your support!

Follow Us on Twitter!

:(