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. String object method used to return the position of the first instance of a specified search string starting from the specified index






2. String object method used to return a new string that contains part of the original string from the specified start position






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






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






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






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






7. Statements end in JavaScript with a ________






8. To access a page element by id






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






10. To create a new Date object






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






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






13. To create an Array object in JavaScript






14. To create a single line comment in JavaScript






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






16. To get the current value for textboxes






17. To display an alert






18. To concatenate multiple parts into a string






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






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






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






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






23. String object method used to return a new string that contains part of the original string from the specified start position and up to but not including the specified stop index






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






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






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






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






28. To assign actions to the window onLoad event






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






30. To get the value or the currently selected item for lists






31. To set the digit precision of a decimal number






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






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






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






35. To view the current web address using JavaScript






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






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






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






39. The available properties for the Number object: Number.MAX_VALUE - Number.MIN_VALUE - Number.POSITIVE_INFINITY - _______ - Number.NaN






40. JavaScript is case _______






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






42. To set the control to be disabled for textboxes






43. The string escape sequence to start a new line in JavaScript






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






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






46. A statement that yields a value






47. To denote a string in JavaScript






48. To code an If statement in JavaScript






49. The syntax of a conditional operator






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