Test your basic knowledge |

Javascript Basics

Subject : it-skills
Instructions:
  • Answer 50 questions in 15 minutes.
  • If you are not ready to take this test, you can study here.
  • Match each statement with the correct term.
  • Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.

This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. To get the current checked status of the control for checkboxes






2. To display a confirmation






3. To test that a variable contains a valid number






4. To create a function that returns a value in JavaScript






5. This returns only True or false values






6. To code an If statement in JavaScript






7. To create an Array object in JavaScript






8. To assign the return value of confirm() to a variable






9. Date object method used to return a string containing the time






10. A statement that yields a value






11. The identity operator for not equal






12. Math object method used to return a given number rounded to the next highest integer value






13. The string escape sequence to insert a double quote in JavaScript






14. Unlike ________________ identity operators do not perform type coercion.






15. Number object method used to return a string with a given number base






16. To get the current checked status of the control for radio buttons






17. To code a while statement in JavaScript






18. The ________ tag is used to display the text between the opening and closing tag if JavaScript is disabled or otherwise not available






19. A _______ variable can be changed and accessed from within and without a function or object.






20. To assign the value from a prompt to a non-string variable






21. To assign actions to the window onLoad event






22. To declare a variable in JavaScript






23. To get the current value for textboxes






24. To write a line to the current element of the DOM (Document Object Model)






25. The format to create a new Date object from a string






26. To access a page element by id






27. The _____ attribute is used to denote external file for script use






28. A list-like construct that has properties which corresponds to JavaScript values or variables or other objects.






29. Math object method used to return a given number raised to a given power






30. The string escape sequence to insert a backslash in JavaScript






31. To concatenate multiple parts into a string






32. The two methods common to most controls: ______ //Brings focus to the control blur //Removes focus from the control






33. To display an alert






34. What String object method returns a new string containing the value of the original string but in all lower case






35. What Date object method is used to return the number of milliseconds since the start of GMT






36. To set the digit precision of a decimal number






37. The string escape sequence to insert a tab in JavaScript






38. The four attributes of the <script> tag:Type - Src - _____ and Defer






39. A function that is called with a certain event occurs - e.g. button.onclick and window.onload.






40. To set the current checked status of the control for radio buttons






41. Math object method used to return the lowest value for a set of supplied numbers






42. Number object method used to return a numerical string with the specified number of significant digits






43. Math object method used to return a random number






44. Math object method used to return a given number rounded to the next lowest integer value






45. Math object method used to return the highest value from a set of supplied numbers






46. ________ comments start with / and end with /.






47. The valid characters for an identifier in JavaScript: Letters - Numbers - ________ and Dollar Signs






48. The string escape sequence to insert a form feed in JavaScript






49. The identity operator for equals






50. To make the browser load a new page using JavaScript