๐Ÿงช Javascript Design Patterns MCQ Quiz Hub

Javascript Design Patterns Mcq Question Set 2

Choose a topic to test your knowledge and improve your Javascript Design Patterns skills

The amount of scenario interaction is related to which of the following metrics?





โœ… Correct Answer: 4

Which of the following is correct?





โœ… Correct Answer: 4

Which type of JavaScript language is ___





โœ… Correct Answer: 2

Which of the following is the correct output for the following JavaScript code: varx=5,y=1 var obj ={ x:10} with(obj) { alert(y) }





โœ… Correct Answer: 1

Which one of the following also known as Conditional Expression:





โœ… Correct Answer: 4

In JavaScript, what is a block of statement?





โœ… Correct Answer: 2

When interpreter encounters an empty statements, what it will do:





โœ… Correct Answer: 4

The "function" and " var" are known as:





โœ… Correct Answer: 3

In the following given syntax of the switch statement, the Expression is compared with the labels using which one of the following operators? switch(expression) { statements }





โœ… Correct Answer: 1

What will happen, if the following JavaScript code is executed? var count =0; while (count <10) { console.log(count); count++; }





โœ… Correct Answer: 3

Which one of the following is the correct way for calling the JavaScript code?





โœ… Correct Answer: 4

Which of the following type of a variable is volatile?





โœ… Correct Answer: 1

Which of the following option is used as hexadecimal literal beginning?





โœ… Correct Answer: 4

When there is an indefinite or an infinite value during an arithmetic computation in a program, then JavaScript prints______.





โœ… Correct Answer: 3

n the JavaScript, which one of the following is not considered as an error:





โœ… Correct Answer: 3

Which of the following givenfunctions of the Number Object formats a number with a different number of digits to the right of the decimal?





โœ… Correct Answer: 2

Which of the following number object function returns the value of the number?





โœ… Correct Answer: 2

Which of the following function of the String object returns the character in the string starting at the specified position via the specified number of characters?





โœ… Correct Answer: 3

In JavaScript the x===y statement implies that:





โœ… Correct Answer: 3

Choose the correct snippet from the following to check if the variable "a" is not equal the "NULL":





โœ… Correct Answer: 1

Suppose we have a text "human" that we want to convert into string without using the "new" operator. Which is the correct way from the following to do so:





โœ… Correct Answer: 4

What will be the output of the following JavaScript code? functioncomparison() { int number=10; if(number==="10") returntrue; else returnfalse; }





โœ… Correct Answer: 1

Find out the correct output of the following given piece of code from the given options: functionfun() { int y=10; char z=10; if(y.tostring()===z) returntrue; else returnfalse; }





โœ… Correct Answer: 4

See the given code of JavaScript and choose the correct output from the following: var string1 = "40"; varvalueinit=50; alert( string1 +intvalue);





โœ… Correct Answer: 3

In JavaScript, what will be used for calling the function definition expression:





โœ… Correct Answer: 2

Which of the following one is the property of the primary expression:





โœ… Correct Answer: 4

Consider the following snippet of JavaScript code: var text ="testing: 1, 2, 3";// Sample text var pattern =/d+/g// Matches all instances of one or more digits Which one of the following statement is most suitable to check if the pattern matches with the sting "text".





โœ… Correct Answer: 4

Which one of the following is used for the calling a function or a method in the JavaScript:





โœ… Correct Answer: 3

The "new Point(3,2)", is a kind of _______ expression





โœ… Correct Answer: 1

Which one of the following operator is used to check weather a specific property exists or not:





โœ… Correct Answer: 4

Which one of the following is an ternary operator:





โœ… Correct Answer: 1

"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_____.





โœ… Correct Answer: 4

Which of the following is the correct output for the following JavaScript code: function display1(option) { return(option ? "true" : "false"); } bool ans=true; console.log(display1(ans));





โœ… Correct Answer: 2

Which one of the following is correct output for the following given JavaScript code: var obj= { length:20, height:35, } if('breadth' in obj === false) { obj.breadth = 12; } console.log(obj.breadth);





โœ… Correct Answer: 3

Which one of the following is correct output for the following given JavaScript code: functionheight() { var height=123.56; var type =(height>=190)?"Taller":"Little short"; return type; }





โœ… Correct Answer: 2

Which one of the following is correct output for the following given JavaScript code: string X= "Good"; string Y="Evening"; alert(X+Y);





โœ… Correct Answer: 3

Which one of the following is correct output for the following given JavaScript code: functionoutputfun(object) { var place=object ?object.place: "Italy"; return "clean:"+ place; } console.log(outputfun({place:India}));





โœ… Correct Answer: 3

Which one of the following is correct output for the following given JavaScript code: <p id="demo"></p> <script> functionourFunction() { document.getElementById("demo").innerHTML=Math.abs(-7.25); } </script>





โœ… Correct Answer: 3

Which one of the following is correct output for the following given JavaScript code: <p id="demo"></p> <script> function Function1() { document.getElementById("demo").innerHTML=Math.cbrt(792); } </script>





โœ… Correct Answer: 1

Which one of the following is correct output for the following given JavaScript code <p id="demo"></p> <script> functionmyFunction() { document.getElementById("demo").innerHTML=Math.acos(0.5); } </script>





โœ… Correct Answer: 4

What we will get if we compare the "one" with "8" using the less than operator ("one"<8)?





โœ… Correct Answer: 1

Which one of the following is known as the Equality operator, which is used to check whether the two values are equal or not:





โœ… Correct Answer: 3

Which one of the following operator returns false if both values are equal?





โœ… Correct Answer: 3

In a case, where the value of the operator is NULL , the typeof returned by the unary operator is___.





โœ… Correct Answer: 4

Which one of the following is correct output for the following javascriptcode: var string1 = "Letsfindout"; var intvalue = 40; alert( string1 + intvalue );





โœ… Correct Answer: 3

Which one of the following is not a keyword:





โœ… Correct Answer: 4

What are the three important manipulations for a loop on a loop variable?





โœ… Correct Answer: 4

f the following piece of JavaScript code is executed, will it work if not, what kind of possible error can occur? function fun(o) { for(;o.next; oo =o.next); return o; }





โœ… Correct Answer: 1

What is the role of the "continue" keyword in the following piece of JavaScript code? while (x !=0) { if(x ==1) continue; else x++; }





โœ… Correct Answer: 4

Which one of the following is not considered as "statement" in the JavaScript?





โœ… Correct Answer: 1