Question
a.
false.toString()
b.
String(false)
c.
String newvariable="false"
d.
Both false.toString() and String(false)
Posted under JavaScript
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Assume that we have to convert "false" that is a non-string to string. The command that we use is (without invoking the "new" operator)
Similar Questions
Discover Related MCQs
Q. Consider the following snippet code:
var string1 = "123";
var intvalue = 123;
alert( string1 + intvalue );
The result would be
View solution
Q. A function definition expression can be called
View solution
Q. The property of a primary expression is
View solution
Q. Consider the following statements:
var text = "testing: 1, 2, 3"; // Sample text
var pattern = /d+/g // Matches all instances of one or more digits
In order to check if the pattern matches with the string "text", the statement is
View solution
Q. The JavaScript's syntax calling ( or executing ) a function or method is called
View solution
Q. What kind of an expression is "new Point(2,3)"?
View solution
Q. Which of the operator is used to test if a particular property exists or not?
View solution
Q. Among the following, which one is a ternary operator?
View solution
Q. "An expression that can legally appear on the left side of an assignment expression." is a well known explanation for variables, properties of objects, and elements of arrays. They are called
View solution
Q. JavaScript is a _______________ language
View solution
Q. A statement block is a
View solution
Q. When an empty statement is encountered, a JavaScript interpreter
View solution
Q. The "var" and "function" are
View solution
Q. Consider the following statement:
switch(expression)
{
statements
}
In the above switch syntax, the expression is compared with the case labels using which of the following operator(s) ?
View solution
Q. Consider the following statement:
var count = 0;
while (count < 10)
{
console.log(count);
count++;
}
In the above code snippet, what happens?
View solution
Q. The enumeration order becomes implementation dependent and non-interoperable if :
View solution
Q. What are the three important manipulations done in a for loop on a loop variable?
View solution
Q. Consider the following code snippet
function tail(o)
{
for (; o.next; o = o.next) ;
return o;
}
Will the above code snippet work? If not, what will be the error?
View solution
Q. One of the special feature of an interpreter in reference with the for loop is that
View solution
Q. What will happen if the body of a for/in loop deletes a property that has not yet been enumerated?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond JavaScript? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!