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 create a single line comment in JavaScript






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






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






4. To code a while statement in JavaScript






5. To display an alert






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






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






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






9. JavaScript is case _______






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






11. To test that a variable contains a valid number






12. To code a button.onclick event handler






13. To assign actions to the window onLoad event






14. To access a page element by id






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






16. To create a function in JavaScript






17. The string escape sequence to insert a vertical tab in JavaScript






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






19. String object method used to concatenate multiple strings






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






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






22. To create a new Date object






23. This returns only True or false values






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






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






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






27. The identity operator for not equal






28. Statements end in JavaScript with a ________






29. To display a confirmation






30. Math object method used to return the square root of a given number






31. To set the digit precision of a decimal number






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






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






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






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






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






37. String object method used to get the character at a specified index position






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






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






40. To concatenate multiple parts into a string






41. To set the control to be disabled for textboxes






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






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






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






45. To set the current value of the control for a text area






46. When you add a string and a number the result will be a ____






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






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






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






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