Has anyone else been looking following along with the examples in the Array section of chapter 3?
It declares a const variable and then in the examples and then teaches you how to concatenate multiple items on the array.
const avengers = [
Array concat() Method
avengers = avengers.concat([
I get the error message:
TypeError: Assignment to constant variable.
Is the book incorrect or just mistaken by not using a variable declared with
let instead of
const? Am I making a mistake somewhere? I tried declaring another variable and using the same method above and it worked as the book explains.
Any help is appreciated! Newbie here