« first day (4495 days earlier)      last day (436 days later) » 

2:59 AM
@user3112634 Please don't post unformatted code - use the up arrow to edit your post, then hit Ctrl + K to format the code in that post. See the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
1 message moved to Trash can
 
var foo = {
    bar: "hello"
};

var foo2 = foo;
does modifying foo2.bar change foo.bar
 
 
6 hours later…
8:51 AM
@user3112634 Yes. foo and foo2 are exactly the same thing. Just different identifiers for the same object.
||> var foo = {
    bar: "hello"
};

var foo2 = foo;

foo2.bar = "world";

console.log(foo.bar);
 
@VLAZ undefined Logged: [ '"world"' ] Took: 1ms
 
 
6 hours later…
3:10 PM
 const { avatar, name, id, whatever } = user;
user object can't be undefined, but properities can
I am getting an issue that user can be undefined, why ?
I know that I can do something like this "
id ?? 0
name ?? ''
but why it's necessary to do the same for user ? user ?? {}
 

« first day (4495 days earlier)      last day (436 days later) »