Answer the question
In order to leave comments, you need to log in
What does this console entry mean?
How is it written in the line 3 false and in the column number 2 one true, isn't it the same thing that is displayed in this record in different formats? How to understand it.
Answer the question
In order to leave comments, you need to log in
No need to panic. In JavaScript, all objects are passed by reference, with all the consequences.
This means that after the output to the console, the value of the array has changed. And when you unfold to see what's inside, you see the actual values at the time of opening.
Just execute the code in the console, and open it later.
const arr = [false, false, false];
console.log(arr);
arr[2] = "test";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question