65+ 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 an array literal?
➂ Explain +ve and -ve indexes in an array
➃ What is the data type of an array?
➄ 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 an array literal?
➂ Explain +ve and -ve indexes in an array
➃ What is the data type of an array?
➄ 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 behavior of a sparse array.
➀➀ Convert a sparse array into a dense array.
➇ How to detect a sparse array?
➈ How is a sparse array formed?
➉ Describe the looping behavior of a sparse array.
➀➀ Convert a sparse array into a dense 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 the "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 the "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 a negative index
➅ insert multiple elements at the end of an array
➆ insert multiple elements at the start of an array
➇ remove multiple elements at the start 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 start of an array
➇ remove multiple elements at the start 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 an array
➀➀ populate all indexes with the same value
➀➁ retrieve a sub-array between 2 indices
➀➂ copy an array
➀➃ convert an array-like object to an 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 that loop through the array.
➂ How is a sparse array looped? Describe the different looping methods.
➀ Between for...in and for...of, which is more suitable for an array to loop through?
➁ Mention all Array.prototype methods that loop through the array.
➂ How is a sparse array looped? Describe the 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 the starting/ending/any position by not mutating the original.
➁ Update an element of an array at the starting/ending/any position by not mutating the original.
➀ Insert an element into an array at the starting/ending/any position by not mutating the original.
➁ Update an element of an array at the 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
⬘ A 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.
⬘ A 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
✰ Interview Questions
✰ 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
✰ Interview Questions
✰ Roadmaps
on
➠ Web Development
➠ Data Structures and Algorithms
➠ Databases
Thanks for reading. 🙏
جاري تحميل الاقتراحات...