What happens in the following javaScript code snippet?
var count = 0;
while (count < 10)
{
console.log(count);
count++;
}
a) The values of count are logged or stored in a particular location or storage
b) The value of count from 0 to 9 is displayed in the console
c) An error is displayed
d) An exception is thrown
Answer: b
Explanation: Console.log is a predefined function in JavaScript which takes the value as an argument of its function.console.log prints this value in the argument in the console at the time of execution of the code.
Related Posts
The basic purpose of the toLocaleString() is to _________
Identify the process done in the following JavaScript code snippet?
o = {x:1, y:{z:[false,null,””]}};
s = JSON.stringify(o);
p = JSON.parse(s);The purpose of extensible attribute is to __________
What is the prototype represents in the following JavaScript code snippet?
function f() {};To determine whether one object is the prototype of (or is part of the prototype chain of) another object, one should use the ____________
In the following syntax, the data type within the square brackets must be ___________
book[datatype]=assignment_value;A linkage of series of prototype objects is called as ________
Join The Discussion