+ 6

Why? 4

What is the output of this code? var x = 8; var y = 4; x += y; x /= y; alert(y); answer 4

17th Feb 2019, 3:49 PM
ŠŠ»Š¼Š°Ń‚ ŠŠ¹Ń‚Š±Š°ŠµŠ²
ŠŠ»Š¼Š°Ń‚ ŠŠ¹Ń‚Š±Š°ŠµŠ² - avatar
2 Answers
+ 7
Ah trick question. You are changing only the x value all the time. Y remains the same as initially, 4, and in the end y is alerted.
17th Feb 2019, 3:52 PM
Tibor Santa
Tibor Santa - avatar
+ 4
All right! This is a question for which attention is required. which sometimes we lose this attention. Thank you friend for help ā˜ŗļøšŸ‘
18th Feb 2019, 1:12 AM
ŠŠ»Š¼Š°Ń‚ ŠŠ¹Ń‚Š±Š°ŠµŠ²
ŠŠ»Š¼Š°Ń‚ ŠŠ¹Ń‚Š±Š°ŠµŠ² - avatar