+ 1
Anyone could help to explain below code? Thanks!
let [learn, solo = "solo"]="learn"; [solo, learn] = [learn, solo]; console.log(solo + learn) // output: le
2 Antworten
+ 3
string behaves like array
line 1 =>
[learn = undefined, solo = "solo"] => [learn = "l", solo = "e"]
line 2 =>
[solo = "l", learn = "e"] => console.log
+ 1
Naty Thank you!☺