You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
As a JavaScript developer, I expect to see arrays and objects like primitive value, rather than ones that are completely not writable.
I expect modifying a partial value in tuple/record should update the whole value of tuple/record.
constfoo= #[1,2,3];letbar=foo;console.log(foo===bar);// truebar[1]=5;// It's `let` binding. I think this is OKconsole.log(foo===bar);// falsebar[1]=2;// change backconsole.log(foo===bar);// truefoo[1]=5;// expect runtime error, foo is `const` binding!!!/* It' similar to primitive value *//* Think the above code as following */consta=1;letb=a;console.log(a===b);// trueb=5;console.log(a===b);// falseb=1;console.log(a===b);// truea=5;// runtime error!!!