JavaScript Interview Questions

Series: 2️⃣
Level: Beginner
Topics:

➊ Basics about Arrays
➋ Array Properties
➌ Array Methods
➍ Looping through Arrays
➎ Array related Operators
➏ Common Array Operations
➐ Comparison of Terms
🚥 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.
➊ Basics about Arrays

➀ Describe an Array in JS perspective?
➁ What is Array Literal?
➂ Explain about +ve and -ve indexes in an Array?
➃ What is Array's type?
➄ What is an Array-Like object?
➅ Which Array operations can be done on an Array-Like object?
➆ What is a sparse array and, a dense array?
➇ How to detect a sparse array?
➈ How is a sparse array formed?
➉ Describe the looping behaviour for a sparse array.
➋ Array Properties

➀ How to find size of an array?
➁ How to create an Array of a given size?
➂ Is array in JavaScript static sized or, dynamic sized?
➃ Is "length" a mutable property?
Or,
➃ Can "length" of an Array be changed manually?
➄ What does happen when "length" is reduced?
➅ What will happen when "length" is increased?
➆ How to remove elements from the end of an array by manipulating the "length" property?
➌ Array Methods

➀ Which methods of Array.prototype accepts negative indexes?
➁ How to do deep level flat operation?

✪Which method will you use to

➂ find the first element of an array that matches a condition
➃ find if an array has an element that matches a condition
➄ fetch an element using negative index
➅ insert multiple elements at the end of an array
➆ insert multiple elements at the starting of an array
➇ remove multiple elements at the starting of an array
➈ remove multiple elements at the end of an array
➉ insert multiple elements at an index after removing multiple elements from the same index
➀➀ populate all indexes with the same value
➀➁ retrieve a sub-array between 2 indices
➀➂ copy an array
➀➃ convert an array-like object to array
➍ Looping through Arrays

➀ Between for...in and for...of, which is more suitable for an Array to loop through?
➁ Mention all Array.prototype methods which loop through the array.
➂ How is a sparse array looped? Describe for different looping methods.
➎ Array related Operators

➀ What is destructuring assignment for arrays?
➁ What is rest parameter inside destructuring assignment?
➂ Which is valid? [a, b, ...c], [a, ...b, c]
➃ Explain how spread operator operates.
➄ Swap 2 numbers using Array Destructuring.
➏ Common Array Operations

➀ Insert an element into an array at starting/ending/any position by not mutating the original.

➁ Update an element of an array at starting/ending/any position by not mutating the original.
➂ Delete an element from an array at starting/ending/any position by not mutating the original.

➃ Insert and delete an element into/from an array at starting/ending/any position by using splice()

➄ Create a copy of an array using spread operator syntax.
➅ Merge 2 or, more arrays using concat()
➆ Merge 2 or, more arrays using flat()
➇ Merge 2 or, more arrays using spread operator syntax
➈ Find sum of all elements in an array using reduce()
➉ Shuffle elements of an array
➐ Comparison of Terms

Mention the difference between

➀ "Array()" and "new Array()"
➁ Single and Multiple parameter Array()
➂ Array.of() and Array.from()
➃ find() and filter()
➄ findIndex() and indexOf()
➅ includes() and some()
➆ some() and every()
➇ map() and flatMap()
➈ slice() and splice()
➉ forEach() and map()
➀➀ forEach() and for...of
➀➁ shift() and pop()
➀➂ unshift() and push()
➀➃ reduce() and reduceRight()
⚠️ 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.
🚏 Today's Twitter Space

📅 12-Feb-2022 (Today)
⏰ 07.30PM IST (02.00PM GMT)

⬘ Join me in this space to have some interesting technical discussion around "Arrays and Functions in JavaScript".

⬙ Share among your circle if anyone is interested.
twitter.com/i/spaces/1dRJZ…
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

Feb 13
🎨 140 Color Names in HTML - Cheat Sheet

To direct access it in HQ, find the link in next tweet.
. Image
🏙 High Quality Infographics

⬘ I have created a repository in GitHub. This will contain most of the infographics I create in HD Quality.

⬖ To never miss any, add this repo to your "Watch" list.

⬙ To encourage me, give a ⭐️ to this repo.

Direct Link:
github.com/swapnakpanda/I…
⚠️ Repost Notice ⚠️

⬘ I shared this cheat sheet 5 days back where I promised to share the HQ link in DMs.

⬖ I couldn't keep my promise because Twitter barred me from making too many DMs.

⬙ So, here I am sharing the link directly. Hope it will benefit all.
Read 5 tweets
Feb 11
JavaScript essentials for your React journey

➊ Basics

⇥ Variable Declaration
⇥ Variable Scope
⇥ Variable Hoisting
⇥ Functions
⇥ Arrow Functions
⇥ Callback Functions
⇥ Closure
⇥ Basic Operators
⇥ Array Literals
⇥ Object Literals
⇥ if, if...else
⇥ for, for...in, for...of, while, do...while
➋ Array.prototype Methods

⇥ forEach()
⇥ map()
⇥ reduce()
⇥ flat()
⇥ flatMap()
⇥ find()
⇥ filter()
⇥ slice()
⇥ splice()
⇥ push()
⇥ pop()
⇥ shift()
⇥ unshift()
⇥ some()
⇥ every()
Read 13 tweets
Feb 10
25 Utility Code for your next JavaScript Project

➊ Check if input is of number type
➋ Check if input value contains a number
➌ Check if input value is null or, undefined
➍ Check if input value is null or, empty string
➎ Check if input value is falsy
➏ Check if input is an Array
➐ Check if input is an Empty object
Read 11 tweets
Feb 9
Do you think it's peculiar?

parseInt(0.5); // => 0
parseInt(0.05); // => 0
parseInt(0.005); // => 0
parseInt(0.0005); // => 0
parseInt(0.00005); // => 0
parseInt(0.000005); // => 0
parseInt(0.0000005); // => 5

Here's why. A JavaScript 🧵
➊ What is parseInt?

parseInt is a function which

→ takes a "String" input
→ parses this input
→ returns the parsed "integer" value
➋ What if input is not a String?

If input is not a String, it's first converted to String and, then parsed.
Read 9 tweets
Feb 8
🎨 All (140) HTML Color Names

If you are interested in the HD quality of this cheat sheet,

✓ Like (❤️) this Tweet
✓ Follow me ✅
✓ Reply (💬) to this Tweet with a 👋
✓ Retweet (🔁) for more chances.

I will share you the direct link in DM. Image
🚥 Disclaimer

I have compiled these information with all sincerity. But in case you find any omissions or, wrong representations, please inform me.
🚏 Upcoming Twitter Space

📅 12-Feb-2022 (Saturday)
⏰ 07.30PM IST (02.00PM GMT)

⬘ Join me in this space to have a technical discussion around "Arrays and Functions in JavaScript".

⬙ Share among your circle if anyone is interested.

twitter.com/i/spaces/1dRJZ…
Read 4 tweets
Feb 7
JavaScript Interview Preparation Simplified

➊ Common Expectations

➊.➀ Behavioural Skills

➀ Good Etiquette
➁ Ability to work in a Team
➂ Ability to provide solutions
➃ Proactivity in detecting issues
➄ Ability to work in diverse situations
➅ Time management
➆ Handling criticism
➇ Handling escalations
➊.➁ Technical Skills

➀ Language Syntax
➁ Key features in JavaScript
➂ Frameworks/Libraries
➃ Portfolio/Real Projects
Read 16 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!

:(