A. VALUE
B. ==
C. EQUALS
D. =
Multiple Declarations of variables are separated by ___________ symbol
Underscore can be used as first letter while declaring variable in JavaScript.
var var1 = "Pritesh";
Above variable can store value of type.
<!DOCTYPE html> <html> <body> <script> var x = 5; var y = 6; var z = 5 + 6; document.write(x + "<br>"); document.write(y + "<br>"); document.write(z + "<br>"); </script> </body> </html>
Guess output of the following code.
<!DOCTYPE html> <html> <body> <script> var x = "5"; var y = 6; var z = x + y; document.write(x + "<br>"); document.write(y + "<br>"); document.write(z + "<br>"); </script> </body> </html>
Variable declared without a value will have the value ______________.Eg.
var num;
<!DOCTYPE html> <html> <body> <script> var num1 = 1; var num2 = 1; var num3 = "1" + num1 + num2; document.write(num1 + "<br>"); document.write(num2 + "<br>"); document.write(num3 + "<br>"); </script> </body> </html>
<html> <body> <script> var x = 12.45; var y = 1; var z = '8' + x + y; document.write(z + "<br>"); </script> </body> </html>
Value of Z is
<html> <body> <script> var name = "John Doe"; var name = 123; document.write(name + "<br>"); </script> </body> </html>
Is it possible to change the type of value after re-assignment.
Is it necessary to use "var" keyword while declaring variable.