It seems like you are using an ad blocker. To enhance your experience and support our website, please consider:

  1. Signing in to disable ads on our site.
  2. Sign up if you don't have an account yet.
  3. Or, disable your ad blocker by doing this:
    • Click on the ad blocker icon in your browser's toolbar.
    • Select "Pause on this site" or a similar option for lancecourse.com.

JavaScript Arrays and Objects Quiz

Test your knowledge of arrays and objects in JavaScript.

Question 1

What method adds an element to the end of an array?

Question 2

How do you access the property of an object?

Question 3

What will fruits.length return for the array `fruits=['apple', 'banana']`?

Question 4

Which method removes the last element from an array?

Question 5

What does `push()` do in JavaScript?

Question 6

How do you delete a property from an object?

Question 7

Which of the following is an array of objects?

Question 8

What method would you use to check if an array includes a certain value?

Question 9

How can you iterate over an array in JavaScript?

Question 10

What is the correct way to create an object in JavaScript?