Swapna Kumar Panda
Swapna Kumar Panda

@swapnakpanda

18 Tweets 7 reads Aug 13, 2022
60+ JavaScript Interview Questions
โ‡ฉ
Level: Beginner and, Medium
Topics:
โžŠ Basics about Arrays
โž‹ Array Properties
โžŒ Array Methods
โž Looping through Arrays
โžŽ Array related Operators
โž Common Array Operations
โž Comparison of Terms
โžŠ Basics about Arrays
โž€ Describe an Array from JavaScript 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 the size of an array?
โž How to create an array of a given size?
โž‚ Is the 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 -ve 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 the 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()
๐Ÿšฅ Disclaimer
โฌ˜ Few questions covered here are already shared by me.
โฌ— Don't assume that only these types of questions are asked during interviews.
โฌ™ For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
Hey ๐Ÿ‘‹
I am a Tech Writer, Educator, and Mentor from India ๐Ÿ‡ฎ๐Ÿ‡ณ, here sharing
โœ… Tutorials
โœ… Tricks
โœ… Career Tips
โœ… Cheat Sheets
โœ… Project Ideas
โœ… Roadmaps
on
โž  Web Development
โž  Data Structures and Algorithms
โž  Databases
Thanks for reading. ๐Ÿ™

Loading suggestions...