JavaScript Interview Questions

Series: ➌
Level: Beginner
Topics:

➊ Functions - Basics
➋ Function Scope
➌ Function Arguments
➍ Anonymous Functions
➎ Higher Order Function & Callbacks
➏ Closure
➐ IIFE
➑ Arrow Functions
🚥 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.
➊ Functions - Basics

➀ Can a function name be used like a normal variable?

➁ What is the difference between "myFunction" and "myFunction()"?

➂ Does every function in JS return something even if not explicitly stated? If yes, what does it return by default?
➋ 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?
➌ 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 list?
➆ Define some valid and invalid use cases of rest parameter?

➇ Define significant differences between "arguments" and "a rest parameter".
➍ Anonymous Functions

➀ What are different ways of defining a function?
➁ What is an anonymous function?
➂ Where will an anonymous function be useful? Give some examples of valid use cases.
➃ What is the difference between
❍ function a() {}
❍ let a = function() {}

➄ Are all JavaScript function declarations hoisted?
➎ Higher Order Function & Callbacks

➀ What is a callback function?
➁ Highlight some use cases for callback functions?
➂ Mention few in-built functions that accepts a callback.
➃ What is a higher order function (HOF)?
➏ 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.
➐ IIFE

➀ What is IIFE?
➁ Highlight some use cases of IIFE.
➂ Why do we see less usage of IIFE these days? What are its alternatives?
➑ 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?
⚠️ Repost Notice ⚠️

⬖ Though this is my original work, it was previously posted in [CHIRPBIRDICON]

⬘ Many questions have been taken from the original 🧵

⬙ If you liked these questions and do feel others might learn from it, please support.
End of 🧵

Are you looking for Interview Questions? I am sharing interview questions on DSA, SQL, HTML/CSS, JavaScript and React.

If you are interested, Follow me ✅

• • •

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

Mar 4
50+ CSS Problems for Practice

Series: ➊
Level of Difficulty: Easy to Medium

Topics:
➊ CSS Selectors
➋ Background
➌ Border
➍ Margin
➎ Padding
➏ Outline
➐ Text
➑ Position
➒ Overflow
➓ Height/Width
💭 Intention behind this Practice Series

⬘ I believe anyone can strengthen his skills in HTML and CSS only by practicing.

⬗ In CSS, there are so many properties and values. It's impossible to memorize everything.

⬙ By practicing a lot, you can definitely master it.
Read 19 tweets
Mar 3
5 "Must-Know" Date Input Types in HTML

There are 5 input types which allow user to enter/pick date, time, week, month, year etc.

➊ datetime-local
➋ date
➌ time
➍ week
➎ month
➊ datetime-local

⬒ Use this input type if requirement is to pick both "date" and "time" (independent of any timezone).

⬓ We can use 2 other attributes to define the limit restrictions and step values.

❍ min
❍ max
❍ step <input type="datetime-local" >
Read 9 tweets
Mar 2
👩‍💻 HTML & CSS Topics

Learn these
❍ if you are into Web Development
❍ before starting JavaScript

❀ Back-End Developer

❑ You want to learn JavaScript for Node.js environment, you can directly start.

❒ It's not mandatory to have any prior knowledge of HTML & CSS.
❀ Front-End Developer

✔ You can learn basic JavaScript syntaxes even without knowing HTML & CSS.

✘ But you need to switch to HTML & CSS after a point. Then again switch back to JavaScript.

✔ So, I recommend learn HTML & CSS (basics) first and, then jump to JavaScript.
Read 12 tweets
Mar 1
When someone asks me, "How do you grow to 18K from 18 in just 180 days"

I reply: By following these 18 lessons.

🧵 👇
🚥 Disclaimer

⬒ I am not a Growth Expert. Views expressed here are my personal views.

⬔ I don't remember how many followers I had 180 days back.

⬓ None of my tweets are against anyone, any community or, any race. But if you feel attacked, I am really sorry. 🙏
Lesson ➊

Be unique. Have your own style.
Read 21 tweets
Feb 28
🌆 CSS Grid Layout : Properties & Values

Link to High Resolution image in the next tweet. To render contents in Grid layout effectively, there are var
🏙 High Resolution Image

⬒ If you liked this one, give a ⭐️ to this GitHub repo to support my work.

⬓ Direct Link:

github.com/swapnakpanda/I…
🚥 Disclaimer

I have compiled these information with all sincerity. But in case you find any omissions or, wrong representations, please inform me.
Read 4 tweets
Feb 27
10 Sorting Algorithms

⬒ Have you just started studying Data Structures and Algorithms?

⬓ Are you finding difficulties in understanding the sorting algorithms?

I will introduce you here to 10 different sorting algorithms by explaining each using simple terms.
📋 Table of Contents

➊ Bubble Sort
➋ Selection Sort
➌ Insertion Sort
➍ Merge Sort
➎ Quick Sort
➏ Counting Sort
➐ Radix Sort
➑ Bucket Sort
➒ Heap Sort
➓ Shell Sort
➒➑ Time Complexity
➒➒ Space Complexity
Read 18 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

Don't want to be a Premium member but still want to support us?

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

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(