The ___ statement is used to handle errors.
The script tag must be placed in
Which method to use while working with XML fragments, instead of XML()?
What is the method used to create an element in the HTML DOM?
What does the following script do?
What is the output of the following code?
var a = "Coding is fun";
var subStr = a.substring(3, 5);
document.write(subStr);
What will be the output of the following code?
function f2() {
'use strict';
return this;
}
f2() === window;
f2() === undefined;
The output of the following code will be?
<script type="text/javascript" language="javascript">
var a = "Abekus";
var result = a.substring(4, 5);
document.write(result);
</script>
<script>
function my_function()
{
var first_string = "welcome to.\0JavaScript test.";
var first_pattern = /\0/;
var result = first_string.search(first_apattern);
document.getElementById("demo").innerHTML = result;
}
</script>
What will be the output of the following code?
function batting(player, distance) {
if (distance <= 350 && distance > 0) {
document.write(player + "hit the ball");
}
else if (distance <= 0) {
document.write(player + "STRUCK OUT");
}
else {
document.write(player + "hit a home run");
}
}
batting("VINAY ", 0)