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