javascript-july-quiz 0% 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 javascript-july-quiz 1 / 50 Variable declared is example of ________________ Variable. function message() { var varname = "Rajiv"; alert(name); } Global semi-global All of the above 1 2 / 50 What will be the output if we compare "ten" and 10 with less then comparison operator( "ten" <10)? False undefind error 2 3 / 50 Which of the following is not a valid JavaScript variable name? _firstvariable myvariable12 None of the above 1 4 / 50 What is defination of an undefined value in JavaScript? Variable is not assigned to any value Property doesn't exist All of the above 4 5 / 50 What is the correct syntax for referring to an external script called "LFC.js"? <script source="LFC.js"> <script ref="LFC.js"> <script type="LFC.js"> 1 6 / 50 How to get a particular value using the tagged name? getElementsbyName() getElementsbyTagName() getTagName() 3 7 / 50 The _______ method of an Array object adds and/or removes elements from an array. Shift Slice Splice 4 8 / 50 What will be the output if we compare "ten" and 10 with less then comparison operator( "ten" <10)? False undefind error 2 9 / 50 Which of the following is not JavaScript Data Types? Number Boolean Float 4 10 / 50 Which of the following is an array method? Filter Reduce All of these 4 11 / 50 Which of the following is block scoped? Let Const Both b and c 4 12 / 50 What if you use parseInt() to convert a string containing decimal value? It returns the decimal values in string form If returns only the integer portion of the number None of the listed option 3 13 / 50 Which of the following is block-scoped? let const Both B and C 4` 14 / 50 The pop() method of the array does which of the following task ? increments the total length by 1 prints the first element but no effect on the length updates the element 1 15 / 50 Variable declared is example of ________________ Variable. function message() { var varname = "Rajiv"; alert(name); } Global semi-global All of the above 1 16 / 50 Why so JavaScript and Java have similar name? JavaScript's syntax is loosely based on Java's They both originated on the island of Java None of the above 2 17 / 50 What if we put ++ operator inside if condition? find the output 10 1010 11 4 18 / 50 Which operator is known as the strict equality operator, which checks whether its two operators are identical or not? == && === 3 19 / 50 The _______ method of an Array object adds and/or removes elements from an array. Shift Slice Splice 4 20 / 50 Find output of below Javascript addition code document.write("1 plus 1 is " + 1 + 1); 1 plus 1 is 2 1 plus 1 is 11 1 plus 1 is 1 + 1 3 21 / 50 Which of the following is block scoped? Let Const Both b and c 4 22 / 50 Which operator is known as the strict equality operator, which checks whether its two operators are identical or not? == && === 3 23 / 50 Which symbol is used for comments in Javascript? Function Boolean Array 3 24 / 50 What if you use parseInt() to convert a string containing decimal value? It returns the decimal values in string form If returns only the integer portion of the number None of the listed option 3 25 / 50 The pop() method of the array does which of the following task ? increments the total length by 1 prints the first element but no effect on the length updates the element 1 26 / 50 Which of the following is not a valid JavaScript variable name? _firstvariable myvariable12 None of the above 1 27 / 50 Which method converts JSON to a JavaScript object? JSON.stringify() JSON.parse() JSON.convert() 3 28 / 50 Syntax for creating a RegExp object: 1. var txt=new RegExp(pattern,attributes); 2. var txt=/pattern/attributes; Which of the above mentioned syntax will correct? 2 only Both 1 and 2 None of the above 3 29 / 50 What is the result of: [] + [] in JavaScript? [] "undefined" "" 4 30 / 50 . Which of the following is a primitive data type in JavaScript? The browser window object The event that fired A new instance 2 31 / 50 Which of the following are the errors in JavaScript? Run time errors: Logical Errors: All of the above 2 32 / 50 Which of the following method checks if its argument is not a number? nonNaN() NaN() None of the above 1 33 / 50 What will be the output of the following JavaScript code? num1=5; function cal() { num1=10; num2=5; num3=num2*num1; console.log(num3); } cal(); 50 100 error 2 34 / 50 Which of the following is an array method? Filter Reduce All of these 4 35 / 50 Which company developed JavaScript? Bell Labs Sun Microsystems IBM 1 36 / 50 What is the correct syntax for referring to an external script called "LFC.js"? <script source="LFC.js"> <script ref="LFC.js"> <script type="LFC.js"> 1 37 / 50 Which of the following is a valid variable name in JavaScript? _name @name #name 2 38 / 50 What will be the output of the following JavaScript code? num1=5; function cal() { num1=10; num2=5; num3=num2*num1; console.log(num3); } cal(); 50 100 error 2 39 / 50 Which of the following method checks if its argument is not a number? nonNaN() NaN() None of the above 1 40 / 50 Why so JavaScript and Java have similar name? JavaScript's syntax is loosely based on Java's They both originated on the island of Java None of the above 2 41 / 50 If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph? para1.value="New Text"; para1.firstChild.nodeValue= "New Text"; para1.nodeValue="New Text" 3 42 / 50 How to get a particular value using the tagged name? getElementsbyName() getElementsbyTagName() getTagName() 3 43 / 50 What will be the output of: console.log(typeof NaN); "undefined" "number" "object" 2 44 / 50 Syntax for creating a RegExp object: 1. var txt=new RegExp(pattern,attributes); 2. var txt=/pattern/attributes; Which of the above mentioned syntax will correct? 2 only Both 1 and 2 None of the above 3 45 / 50 Find output of below Javascript addition code document.write("1 plus 1 is " + 1 + 1); 1 plus 1 is 2 1 plus 1 is 11 1 plus 1 is 1 + 1 3 46 / 50 If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph? para1.value="New Text"; para1.firstChild.nodeValue= "New Text"; para1.nodeValue="New Text" 3 47 / 50 What if we put ++ operator inside if condition? find the output 10 1010 11 4 48 / 50 What will be the output of this code? let age = 18; if (age < 18) { console.log("Minor"); } else if (age === 18) { console.log("Just became adult"); } else { console.log("Adult"); } Just became adult Adult Error 2 49 / 50 What is defination of an undefined value in JavaScript? Variable is not assigned to any value Property doesn't exist All of the above 4 50 / 50 Which of the following are the errors in JavaScript? Run time errors: Logical Errors: All of the above 2 Your score isThe average score is 2% 0% By Wordpress Quiz plugin