Something totally new I learnt in JavaScript from Chat GPT
Object destructuring and assigning it to an existing object's key:value pairs
May 23, 20232 min read113
Search for a command to run...
Articles tagged with #object
Object destructuring and assigning it to an existing object's key:value pairs
In PHP we can do use isset() for checking the existence of a deeply nested array's key since the beginning of time : <?php $p1 = "a9bedbd81019b877"; $p2 = "47bd5f64f7be5578"; $obj = [ 'people' => [ $p1 => [ 'first...