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. The string escape sequence to insert a double quote in JavaScript






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






3. To assign actions to the window onLoad event






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






5. To test that a variable contains a valid number






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






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






8. To assign the value from a prompt to a string






9. To create an Array object in JavaScript






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






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






12. To get the current value for textboxes






13. To display a confirmation






14. To create a function in JavaScript






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






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






17. The string escape sequence to insert a carriage return in JavaScript






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






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






20. Statements end in JavaScript with a ________






21. To create a Date object in JavaScript






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






23. String object method used to return the position of the first instance of a specified search string starting from the specified index






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






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






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






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






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






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






30. To code a while statement in JavaScript






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






32. Number object method used to round numbers to the specified number of decimal places






33. To concatenate multiple parts into a string






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






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






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






37. Math object method used to return a random number






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






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






40. To code a button.onclick event handler






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






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






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






44. To display an alert






45. String object method used to concatenate multiple strings






46. To set the digit precision of a decimal number






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






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






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






50. The syntax of a conditional operator