What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-14 19:06:03
javascript object destructuring rename
// Renaming // ---------------------------------------------- const { bar: foo } = { bar: 123 }; bar // Uncaught ReferenceError: bar is not defined foo // 123 // Renaming with default value // ---------------------------------------------- const { bar: ... Add solution -
Javascript 2021-09-10 10:44:02
js object destructuring
//simple example with object------------------------------ let obj = {name: 'Max', age: 22, address: 'Delhi'}; const {name, age} = obj; console.log(name); //expected output: "Max" console.log(age); //expected output: 22 console.log(address); ... Add solution
Best helpers
Nicole Yu
+5
Editor
+5
Meaning
+5
PReitz
+5
Bissi
+5
Megadeth
+5
Graham Yates
+5
Daniel Cooke
+5
AMACB
+5