-
What happens in the following javascript code snippet?
var num = 1;
while (num < 15)
{
console.log(num);
num++;
}
-
- An exception is thrown
- An error is displayed
- The values of count are logged or stored in a particular location or storage
- The value of count from 1 to 14 is displayed in the console
- None of these
Correct Option: D
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.