It is worth noting that this is a shallow merge. Meaning that nested objects won't get merged but erased with the latter ones using the spread operator.
// https://repl.it/repls/CluelessSpectacularOrder"use strict";consta={first:true,second:{third:true}};constb={first:true,second:{fourth:true}};constmerged={...a,...b};console.log(JSON.stringify(merged,null,2));/*
{
"first": true,
"second": {
"fourth": true (does not include third!!!)
}
}
*/
The trouble is that here he will check the value of each key. once the value of a key is different from the previous one then it will remove the old value to keep the new value. whatever the nested objects it will do the same process
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It is worth noting that this is a shallow merge. Meaning that nested objects won't get merged but erased with the latter ones using the spread operator.
The trouble is that here he will check the value of each key. once the value of a key is different from the previous one then it will remove the old value to keep the new value. whatever the nested objects it will do the same process