js create a new array code example
Example 1: how to make an array in javascript
var names = ["Sanjith", "Pranav", "Aadya", "Saharsh"]
Example 2: how i create array in javascript
var fruits = ['Apple', 'Banana'];
console.log(fruits.length);
Example 3: new array from javascript
const range = (start, stop, step) => Array.from({ length: (stop - start) / step + 1}, (_, i) => start + (i * step));
range(0, 4, 1);
range(1, 10, 2);
range('A'.charCodeAt(0), 'Z'.charCodeAt(0), 1).map(x => String.fromCharCode(x));