+ 4
Why I am getting the value at the end 'undefined' .please someone explain
24 Réponses
+ 4
wait trying
+ 4
ya bro done
+ 3
what do u want to say bro
+ 3
but if I want to alert the user
+ 3
ohk others will answer bro no problem
+ 3
but I want in h1 tag
+ 3
ohk bro
+ 3
means bro
+ 3
trying to put wait
+ 3
u also share your code
+ 3
its correct but I want that when I click button only then it will ask
+ 3
ooohk I got
+ 3
one more question about this that can we ser our default value like when we press ok without putting value its default is 0 but can we set our own
+ 3
is this right now see
+ 3
done
+ 2
alert() function doesn't have any return value, so to put the answer, you must assign variable 'x' to your h1, not the alert return function.
+ 2
+ 2
Just remove this part of your code:
window.onload =
+ 2
Add the default value as the second argument of the prompt function.
+ 2
how bro