Why console.log(x) outputs undefine?😱 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
19th Oct 2020, 9:05 AM
S M Ashikur Rahman
S M Ashikur Rahman - avatar
4 Answers
+ 3
Simba has answered ur qs but I just wanna add something, if u wanna destructure name out of { name: "John" } but you wanna rename it to fullname u would do it like this const { name: fullname } = obj
19th Oct 2020, 10:32 AM
maf
maf - avatar
+ 7
Because a != x? 🤔
19th Oct 2020, 9:09 AM
Simba
Simba - avatar
+ 3
Tnx a lot💚
19th Oct 2020, 9:16 AM
S M Ashikur Rahman
S M Ashikur Rahman - avatar
+ 2
Oh i see😂🤣🤣
19th Oct 2020, 9:16 AM
S M Ashikur Rahman
S M Ashikur Rahman - avatar