java array methods in javascript mdn code example Example: javascript array methods let fruits = ['Apple', 'Banana'] console.log(fruits.length) // 2