javascript-test-december24 0% 22 123456789101112131415161718192021222324252627282930 javascript-test-december24 1 / 30 Which of the following is not JavaScript Data Types? Undefined Number Boolean Float 2 / 30 Find output of below Javascript addition code document.write("1 plus 1 is " + 1 + 1); 2 1 plus 1 is 2 1 plus 1 is 11 1 plus 1 is 1 + 1 3 / 30 The pop() method of the array does which of the following task ? decrements the total length by 1 increments the total length by 1 prints the first element but no effect on the length updates the element 4 / 30 The _______ method of an Array object adds and/or removes elements from an array. Reverse Shift Slice Splice 5 / 30 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(); 25 50 100 error 6 / 30 Which of the following is not a valid JavaScript variable name? 2varaiblename _firstvariable myvariable12 None of the above 7 / 30 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? 1 only 2 only Both 1 and 2 None of the above 8 / 30 What is defination of an undefined value in JavaScript? Variable used in the code doesn't exis Variable is not assigned to any value Property doesn't exist All of the above 9 / 30 What if you use parseInt() to convert a string containing decimal value? Throws Error It returns the decimal values in string form If returns only the integer portion of the number None of the listed option 10 / 30 What will happen, if the following JavaScript code is executed? var count =0; while (count <10) { console.log(count); count++; } An error is displayed An exception is thrown The values of count variable are logged or stored in a particular location or storage The value of count from 0 to 9 is displayed in the console 11 / 30 Which of the following is an array method? Map Filter Reduce All of these 12 / 30 Which of the following method checks if its argument is not a number? isNaN() nonNaN() NaN() None of the above 13 / 30 Which symbol is used for comments in Javascript? \ // * * * */ 14 / 30 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" para1="New Text" 15 / 30 The "function" and " var" are known as: Keywords Data types Declaration statements Prototypes 16 / 30 What will be the output of the following Javascript code? var string1 = "Letsfindcourse"; var intvalue = 30; alert( string1 + intvalue ); Letsfindcourse 30 30 Letsfindcourse30 Exception 17 / 30 Which of the following are the errors in JavaScript? Load time errors Run time errors: Logical Errors: All of the above 18 / 30 What is the correct syntax for referring to an external script called "LFC.js"? <script src="LFC.js"> <script source="LFC.js"> <script ref="LFC.js"> <script type="LFC.js"> 19 / 30 Why so JavaScript and Java have similar name? JavaScript is a stripped-down version of Java JavaScript's syntax is loosely based on Java's They both originated on the island of Java None of the above 20 / 30 What if we put ++ operator inside if condition? find the output Error 10 1010 11 21 / 30 How to get a particular value using the tagged name? getElementbyID() getElementsbyName() getElementsbyTagName() getTagName() 22 / 30 Which of the following is correct about features of JavaScript? It can not Handling dates and time. JavaScript is a object-based scripting language. JavaScript is not interpreter based scripting language. All of the above 23 / 30 Which company developed JavaScript? Netscape Bell Labs Sun Microsystems IBM 24 / 30 Which of the following is block scoped? Var Let Const Both b and c 25 / 30 Variable declared is example of ________________ Variable. function message() { var varname = "Rajiv"; alert(name); } Local Global semi-global All of the above 26 / 30 Choose the correct JavaScript syntax to change the content of the following HTML code. document.getElement ("letsfindcourse").innerHTML = "I am a letsfindcourse"; document.getElementById ("letsfindcourse").innerHTML = "I am a letsfindcourse"; document.getId ("letsfindcourse") = "I am a letsfindcourse"; document.getElementById ("letsfindcourse").innerHTML = I am a letsfindcourse; 27 / 30 Which operator is known as the strict equality operator, which checks whether its two operators are identical or not? = == && === 28 / 30 What will be the output if we compare "ten" and 10 with less then comparison operator( "ten" <10)? 1 undefind error 29 / 30 JavaScript ignores? spaces tabs newlines All of the above 30 / 30 Among the keywords below, which one is not a statement? if with debugger use strict Your score is LinkedIn Facebook VKontakte 0% By Wordpress Quiz plugin