+ 1
I dare you to give me the output without displaying the code in the play ground !!!
var num1 = prompt("What's your level?");// let's assume that you entered 1 var num2 = num1 + 1; document.write(num2);//what will you get ?
9 Antworten
+ 4
I hope so that prompt always takes string input. So output must be "1"+1=11.
+ 3
OMG!!!
Why you told the answer!?
+ 2
No @Donald , whatever you put in a prompt input , it will treat it like a sting
so the 1 you putted will be a string and the other 1 will be added next to it
result >>> 11
+ 1
@Donald cat , try to add 1 in the prompt input
and give the result
+ 1
is it 11? I didnt try but input should be a string
+ 1
@Baris you're a javascript beast
you'll gain my following
+ 1
bcz @Baris had told it