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 available properties for the Number object: Number.MAX_VALUE - Number.MIN_VALUE - Number.POSITIVE_INFINITY - _______ - Number.NaN






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






3. Math object method used to return a random number






4. Number object method used to return a numerical string with the specified number of significant digits






5. To assign actions to the window onLoad event






6. To display an alert






7. To test that a variable contains a valid number






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






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






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






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






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






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






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






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






16. To insert Javascript into a web page






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






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






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






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






21. Math object method used to return a given number that has been rounded to the closes integer value






22. To access a page element by id






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






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






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






26. To display a confirmation






27. To code an If statement in JavaScript






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






29. JavaScript is case _______






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






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






32. To create a single line comment in JavaScript






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






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






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






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






37. The syntax of a conditional operator






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






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






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






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






42. To code a for statement in JavaScript






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


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






45. To set the digit precision of a decimal number






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






47. To view the current web address using JavaScript






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






49. To create a Date object in JavaScript






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