0

Can anyone explain this code?

JavaScript https://code.sololearn.com/Wd7zSd4VQ932/?ref=app

14th Jan 2020, 6:27 AM
Sachin Shah
Sachin Shah - avatar
4 Answers
+ 4
The variables in objects with : sign are local of that object. But when we use =, then it acts on global x,y and z variables. So for x we have: 4, for y which is reassigned in second object we have: 2, and for z which is replaced with value of z from xyz object in the third line we have: 0. So the string representation will be: 420.
14th Jan 2020, 7:07 AM
Qasem
+ 1
It is trying to show a picture, but since there is no link, it doesnÂŽt show up. Replace line number 7 with: <img src = "https://www.google.com.ar/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png">
14th Jan 2020, 6:31 AM
Fernando Pozzetti
Fernando Pozzetti - avatar
+ 1
It swaps the values of the variables x, y and z in order to make them become x=4, y=2, z=0; Google 420 weed and you will understand it.
14th Jan 2020, 7:01 AM
Fernando Pozzetti
Fernando Pozzetti - avatar
0
Fernando Pozzetti i want explaination of JavaScript part
14th Jan 2020, 6:36 AM
Sachin Shah
Sachin Shah - avatar