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 single quote in JavaScript


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






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






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






5. 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






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






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






8. To create a function in JavaScript






9. To insert Javascript into a web page






10. To set the control to be disabled for textboxes






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






12. To set focus on the control for textboxes






13. To create a Date object in JavaScript






14. To code a button.onclick event handler






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






16. To code a while statement in JavaScript






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






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






19. To view the current web address using JavaScript






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






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






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






23. To test that a variable contains a valid number






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






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






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






27. To code an If statement in JavaScript






28. To create a new Date object






29. To create an Array object in JavaScript






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






31. Statements end in JavaScript with a ________






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






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






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






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






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






37. JavaScript is case _______






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






39. To concatenate multiple parts into a string






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






41. To get the current value for textboxes






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






43. This returns only True or false values






44. To create a single line comment in JavaScript






45. To denote a string in JavaScript






46. To assign a default value to a prompt






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






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






49. Math object method used to return a random number






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