Skip to content

Commit 2123e59

Browse files
authored
Update Assign-To-New-Variable.js
1 parent 13504cc commit 2123e59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Assign-To-New-Variable.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ const {nama: n, umur: u} = mhs;
1818
// Result:
1919
console.log(u); // Output: 33
2020
console.log(n); // Output: Godam Hero
21+
22+
// Object idak berubah setelah destructuring (Object does not change after destructuring).
2123
console.log(mhs);
2224
// Output:
23-
// Object idak berubah setelah destructuring (Object is not changed after destructuring)
2425
// {
2526
// nama: "Godam Hero",
2627
// umur: 33

0 commit comments

Comments
 (0)