1. Which of the following is not JavaScript Data Types?
a. Undefined
b. Number
c. Boolean
d. Float
ans ---> Float
2. Inside which HTML element do we put the JavaScript?
a. <script>
b. <head>
c. <meta>
d. <style>
ans---> <script>
3. Predict Output:
nm="Fruit";
m=nm.length;
switch(m){
case 2: document.write("two");
break;
case 3: document.write("three");
break;
case 4: document.write("four");
break;
case 5: document.write("five");
break;
case 6: document.write("six");
break;
case 7: document.write("seven");
break;
}
a. four
b. five
c. 5
d. 4
ans ---> five
4. >>> in JavaScript is known as
a. bitwise shift right operator
b. bitwise shift left operator
c. input operator
d. output operator
ans ----> bitwise shift right operator
5. Which of the following function of Array object adds one or more elements to the front of an array and returns the new length of the Array?
a. unshift()
b. sort()
c.splice()
d. toString()
ans--> unshift()
6. Which of the following also known as Conditional Expression :
a. Switch statement
b. If-then-else statement
c. Alternative to if-else
d. immediate if
ans---> Alternative to if-else
7. Predict Output of ;
parseInt("010000")/10
a. 1000
b. 01000
c. 010000
d. 100000
ans--> 1000
8. In the JavaScript, which of the following is not considered as an error :
a. Syntax error
b. Missing Semicolons
c. Division by Zero
d. Missing of Bracket
ans---> Division by Zero
9. var eg="Exam is Over"
document.write(eg.substring(2,10))
a. Exam is
b. am is O
c. am is Ov
d. xam is O
ans---> am is Ov
10. In JavaScript, what will be used for calling the function definition expression :
a. Function prototype
b. Function Literal
c. Function calling
d. Function declaration
ans---> Function literal
11. The "new Animal()", is a kind of ..................... expression
a. Object Creation Expression
b. Primary Expression
c. Invocation Expression
d. Constructor Calling Expression
ans---> Object Creation Expression
If you have any doubt, let me know...