Since the ECMA-262 specifications Javascript has gained the Object.freeze() method, which allows for objects, whose properties can not be changed, added or removed.
Yes, it is applicable to arrays too.
const arr = [1,2,3,4]; Object.freeze(arr); Object.isFrozen(arr)// true arr.push(5) // you will get a type error arr.pop() // you will get a type error