JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Firm
Javascript interview questions part 1
Javascript interview questions part 1
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Inside which HTML element do we put the JavaScript?
A.
B.
C.
D.
Show Correct Answer
Correct Answer is :
2. What is the correct place to insert a JavaScript?
A. The section
B. The section
C. Both the section and the section
D. All of the above
Show Correct Answer
Correct Answer is :
Both the section and the section
3. How you can create a function in JavaScript?
A. function = myFunction()
B. function myFunction()
C. function:myFunction()
D.
Show Correct Answer
Correct Answer is :
function myFunction()
4. How you can add comment in JavaScript?
A.
B. comment
C. //comment
D. None of the above
Show Correct Answer
Correct Answer is :
//comment
5. How you can declare array in JavaScript?
A. var size = [ "round", "rectangle", "square"]
B. var size = ( "round", "rectangle", "square")
C. var size ( "round", "rectangle", "square")
D. var size ( "round", "rectangle", "square")
Show Correct Answer
Correct Answer is :
var size = [ "round", "rectangle", "square"]
6. External scripts can’t take the tag _________
A.
B.
C.
D.
Show Correct Answer
Correct Answer is :
7. Arrays in JavaScript are written within ____________
A. {}
B. [].
C. “”
D. ()
Show Correct Answer
Correct Answer is :
[].
8. For displaying data in JavaScript, we can’t use ____________
A. document.write()
B. console.log()
C. innerHTML
D. document.getElementById()
Show Correct Answer
Correct Answer is :
document.getElementById()
9. For testing we should use ________
A. document.write()
B. console.log()
C. window.alert()
D. innerHTML
Show Correct Answer
Correct Answer is :
document.write()
10. Which of the following keyword stops the execution of JavaScript?
A. break
B. return
C. debugger
D. try….catch
Show Correct Answer
Correct Answer is :
debugger
11. typeof “null” in JavaScript is _______
A. number
B. string
C. object
D. undefined
Show Correct Answer
Correct Answer is :
object
12. Negative positions for string do not work in ______________
A. Internet Explorer 8
B. Chrome
C. Safari
D. Opera
Show Correct Answer
Correct Answer is :
Internet Explorer 8
13. For converting string to array we can use ______________ method.
A. charAt()
B. charCodeAt()
C. split()
D. toLowerCase()
Show Correct Answer
Correct Answer is :
split()
14. JavaScript numbers are stored as ______________
A. integers
B. double precision floating point
C. double
D. floating point
Show Correct Answer
Correct Answer is :
double precision floating point
15. Which is not a JavaScript global function?
A. compile()
B. eval()
C. decodeURI()
D. isNaN()
Show Correct Answer
Correct Answer is :
compile()
16. The integers in JavaScript are precise up to ___________
A. 12 digits
B. 10 digits
C. 23 digits
D. 15 digits
Show Correct Answer
Correct Answer is :
15 digits
17. Typeof “infinity” will return ___________
A. string
B. number
C. object
D. undefined
Show Correct Answer
Correct Answer is :
number
18. By default JavaScript displays the numbers as ___________
A. base 16
B. base 10
C. base 6
D. base 2
Show Correct Answer
Correct Answer is :
base 10
19. Which method is not used for converting variables to number?
A. parseInt()
B. Number()
C. parseFloat()
D. valueOf()
Show Correct Answer
Correct Answer is :
valueOf()
20. Which method is not used for converting variables to number?
A. parseInt()
B. Number()
C. parseFloat()
D. valueOf()
Show Correct Answer
Correct Answer is :
valueOf()
Similar Interview Questions
Search for latest jobs
Find Jobs