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