What's the output of following code? | SoloLearn: Learn to code for FREE!

0

What's the output of following code?

<html> <head> </head> <body> <script type="text/javascript"> var name= new Array(2); for(i=0;i<2;i++) { name[i]=prompt("enter your name",""); } document.write(name[0] + name[1]); </script> </body> </html>

1/12/2017 4:38:38 PM

sid

2 Answers

New Answer

0

whatever the user entered I'm your first and second spam box.

0

But it shows undefined or two commas It's not working properly what's the error