JavaScript recognizes six primitive (immutable) data types: Boolean, Null, Undefined, Number, String, and Symbol (new with ES6) and one type for mutable items: Object. Note that in JavaScript, arrays are technically a type of object.

typeof can return any of these data types.

remove elements from the beginning and end of arrays using shift() and pop()

splice() allows us to remove any number of consecutive elements from anywhere in an array.

--

--