createing an array in array code example Example: how i create array in javascript var fruits = ['Apple', 'Banana']; console.log(fruits.length); // 2