How to add an element at the end of an array?
"var" and "function" are :
What are the two incompatible versions of YUI?
How to create an element in the HTML DOM?
How do you specifically execute a command in JavaScript?
What is the output of the following code?
const notUs = ['ant', 'bison', 'camel', 'duck', 'bison'];
console.log(notUs.indexOf('bison'));
What will be the output of the following JavaScript code?
function output(option)
{
return (option ? “yes” : “no”);
}
bool ans=true;
console.log(output(ans));
Predict the output:
function add(fn) {
return function(s) {
var result = s + ' is Best';
fn(result);
}
}
function print(s) {
document.write(s);
}
var g = add(print);
g('Abekus');
What is the output of the following code?
const animals = ['pigs', 'goats', 'sheep'];
const count = animals.push('cows');
console.log(count)
If the user presses “ok” in the dialog box then what will be the output of the following JavaScript code?
function msg()
{
var v= confirm("Are u sure?");
if(v==true)
{
alert("yes");
}
else
{
alert("no");
}
}