javascript-test-december24 0% 22 123456789101112131415161718192021222324252627282930 javascript-test-december24 1 / 30 Which of the following is block scoped? Var Let Const Both b and c 2 / 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 3 / 30 Variable declared is example of ________________ Variable. function message() { var varname = "Rajiv"; alert(name); } Local Global semi-global All of the above 4 / 30 Which symbol is used for comments in Javascript? \ // * * * */ 5 / 30 Which of the following is not JavaScript Data Types? Undefined Number Boolean Float 6 / 30 What if we put ++ operator inside if condition? find the output Error 10 1010 11 7 / 30 Which of the following are the errors in JavaScript? Load time errors Run time errors: Logical Errors: All of the above 8 / 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; 9 / 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"> 10 / 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 11 / 30 Which company developed JavaScript? Netscape Bell Labs Sun Microsystems IBM 12 / 30 Which of the following is an array method? Map Filter Reduce All of these 13 / 30 The _______ method of an Array object adds and/or removes elements from an array. Reverse Shift Slice Splice 14 / 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 15 / 30 The "function" and " var" are known as: Keywords Data types Declaration statements Prototypes 16 / 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 17 / 30 Which of the following is not a valid JavaScript variable name? 2varaiblename _firstvariable myvariable12 None of the above 18 / 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 19 / 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 20 / 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" 21 / 30 Which of the following method checks if its argument is not a number? isNaN() nonNaN() NaN() None of the above 22 / 30 Which operator is known as the strict equality operator, which checks whether its two operators are identical or not? = == && === 23 / 30 Among the keywords below, which one is not a statement? if with debugger use strict 24 / 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 25 / 30 How to get a particular value using the tagged name? getElementbyID() getElementsbyName() getElementsbyTagName() getTagName() 26 / 30 What will be the output if we compare "ten" and 10 with less then comparison operator( "ten" <10)? 1 undefind error 27 / 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 28 / 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 29 / 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 30 / 30 JavaScript ignores? spaces tabs newlines All of the above Your score is LinkedIn Facebook VKontakte 0% By Wordpress Quiz plugin