+ 5
I can't understand this?
What will be the content of the paragraph after the user clicks on it twice? <p id='txt' onclick='test();'>20</p> <script> function test() { var x=document.getElementById('txt'); var n = x.innerHTML; x.innerHTML = n/2; } </script> How the answer is 5?
5 odpowiedzi
+ 18
"How the answer is 5?"
Because as you click on the paragraph twice, it makes it (20/2 = 10) on the first click and (10/2 = 5) on the second click.
+ 6
Because it have been clicked twice.
On first click: 20/2 = 10
On second click: 10/2 = 5
That's how the answer is 5.
+ 2
5
0
i seee
0
i think the answer is == 5