+ 2
What do you do with this? Var x=50; if (x>42){ document.write(x%10)} document.write(42)
Can someone kindly explain this☝☝to me
4 Antworten
+ 1
x =50.
if x>42(true)=> we write in our document remainder after devusion 50/10 =>remainder 0.
write 0 in document.
then we just write in document 42
so result should be 042
I hope it's not real challenge,cause people shouldn't use document.write method...
+ 3
Please take that code, put it in a new playground file and then put the link to the code in the description.
It's always easier to answer when you can access the code directly.(:
+ 2
thank you @Rose and i was the one confused and write document.type instead of write
0
oky