Example 2
Example 2
a. Float
b. Length
c. String
d. Cast
e. None of the above
2. Which type of JavaScript language is ___
a. Object-Orientedb.
b. Object-Based
c. Assembly-language
d. High-level
3. Which of the following is the correct output for the following JavaScript
code:
a. 1
b. Error
c. 10
d. 5
a. Alternative to if-else
b. Switch statement
c. If-then-else statement
d. immediate if
Code A
for(var number=10;number>=1;number--)
{
document.writeln(number);
}
Code B
var number=10;
while(number>=1)
{
document.writeln(number);
number++;
}
a. Code 1
b. Code 2
c. Both Code 1 and Code 2
d. Cannot Compare
a. Keywords
b. Data types
c. Declaration statements
d. Prototypes
a. ===
b. Equals
c. ==
d. equals
9. Which of the following is the correct output for the following JavaScript
code:
a. 9
b. 0
c. 8
d. Undefined
10.Which of the following is the correct output for the following JavaScript
code:
a. 3
b. 0
c. Error
d. 2
11.Which of the following is the correct output for the following JavaScript
code:
a. 10
b. 17
c. 18
d. 0
a. 00
b. 0x
c. 0X
d. Both 0x and 0X
13.Which of the following number object function returns the value of the
number?
a. toString()
b. valueOf()
c. toLocaleString()
d. toPrecision()
14.See the given code of JavaScript and choose the correct output from the
following:
a. compilation error
b. false
c. runtime error
d. true
16.Find out the correct output of the following given piece of code from the
given options:
a. logical error
b. false
c. runtime error
d. true
17.See the given code of JavaScript and choose the correct output from the
following:
a. 4090
b. 90
c. 4050
d. Exception
a. test(text)
b. equals(pattern)
c. test(pattern)
d. text==pattern
19.Which of the following is the correct output for the following JavaScript
code:
a. False
b. True
c. Runtime error
d. Compilation error
20 . Which one of the following is correct output for the following given
JavaScript code:
a. 123.56
b. Taller
c. 190
d. Little shorter