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
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?
โ 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.
โ 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?
โ 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?
โ 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
โ 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 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
โโ 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.
โ 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.
โ 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.
โ 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.
โ 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
โ 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()
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()
โ 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.
โฌ 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. ๐
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...