Wednesday, May 17, 2017

Give an example of a javascript Array.

Using an array literal is the easiest way to create a JavaScript Array.
Syntax:
var array_name = [item1, item2, ...];      

Example

var cars = ["Saab", "Volvo", "BMW"];

No comments:

Post a Comment