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 code a button.onclick event handler






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






3. The available set methods for a Date object: setFullYear() - setMonth() - setDate() - setHours() - setMinutes() - setSeconds() - _________






4. To get the current value of the control for a text area






5. To access the text element in a <span> tag






6. To view the current web address using JavaScript






7. To display an alert






8. To insert Javascript into a web page






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






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






11. To declare a variable in JavaScript






12. Math object method used to return the absolute value of a given number






13. To code an If statement in JavaScript






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






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






16. To test that a variable contains a valid number






17. To assign actions to the window onLoad event






18. To write text to the current element of the DOM






19. Math object method used to return a random number






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






21. Date object method used to return a string containing the date






22. To set the control to be disabled for textboxes






23. To create a Date object in JavaScript






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






25. The identity operator for equals






26. A statement that yields a value






27. To get the current checked status of the control for checkboxes






28. Date object method used to return a string containing the date and time






29. Statements end in JavaScript with a ________






30. To create a single line comment in JavaScript






31. To concatenate multiple parts into a string






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






33. The available get methods for a Date object: getTime() - _________ - getMonth() - getDate() - getHours() - getMinutes() - getSeconds() - getMilliseconds()






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






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






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






37. The escape sequence used to insert a Unicode character into a string in JavaScript






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






39. To set the current checked status of the control for checkboxes






40. Number object method used to return a number in exponential format with the specified number of decimal places






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






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






43. When you __________ a javascript variable it retains its original value






44. To alter the value of the text element in a span tag






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






46. To get the text value of the control for radio buttons






47. The events common to most controls: onfocus - onblur - onclick - _______ - onchange - onselect






48. String object method used to concatenate multiple strings






49. The string escape sequence to insert a single quote in JavaScript


50. This returns only True or false values