Interview Questions

1. How to create an array in JavaScript?

There are 3 ways to create an array in JavaScript.

  1. By array literal
  2. By creating an instance of Array
  3. By using an Array constructor

Let's see a simple code to create an array using the array literal.

var emp=["Shyam","Vimal","Ratan"];

By Md Riyazuddin 2 0
Is this helpful? Yes No

Submit an interview question

Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of w3Sniff.

Get Started


Leave a Comment

Check out more interview questions

Based on your skills

MS SQL Server

1433419 1720 18 859


35899 92 0 46


28192 72 1 36