+ 1

Javascript

<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <script> var y=15/3; document.type(y); </script> </body> </html someone help find the error it displays 20 as the out put and shouldnt be so

20th Dec 2016, 5:06 PM
Hayes njogu
Hayes njogu - avatar
3 Answers
+ 3
I think you have a typo in there. What do you expect document.type to do?
20th Dec 2016, 5:18 PM
James Durand
James Durand - avatar
+ 1
document.write(y);
20th Dec 2016, 5:20 PM
kallzo
kallzo - avatar
0
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <script> var y=15/3; document.write(y); </script> </body> </html try it
29th Dec 2016, 3:10 PM
Saleh Sayeem
Saleh Sayeem - avatar