JAVASCRIPT AND CREATING WEB PAGE - Practice Mode

1) How will javascript treat a number, when it is enclosed with double or single quotes?
Correct Answer: String
2) What will be the output for the following JavaScript code?
var x = 13 +'03'
Alert(x);
Correct Answer: 1303
3) What will be the output, if the javascript code is executed
var x = 1324;
var y = new Number(1324);
if( x === y)
alert('Yes');
else
alert('No')
Correct Answer: Yes
4) What is the output of the following JavaScript code?
var x = 'ITI';
var y = 'GOVT';
var o = y concat(x)
document.write(o);
Correct Answer: GOVTITI
5) What is the output of the following javascript code?
var name = 'Kanya Kumari' ;
var x = name.substr(8,2);
document.write(x);
Correct Answer: ma