@lily arrays and objects do this in js yes. what const means is you cannot change it with the = statement. you can push to an array, pop elements off, you can access properties of objects and methods on them and change all of them- but you cant go and do obj = {something: “else”}
. practically its constant for numbers and strings.
However- there is a way to have it constant at a deeper level: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
@lily
const obj = {}
obj.whatever = “i can do this”
obj = { butICannot: “do this” }
const arr = []
arr.push(“this is fine!”)
arr = [“but this will throw.”]
it is Just the = on the variable itself, none of its fields or anything is constant