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 set the current checked status of the control for checkboxes






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






3. Statements end in JavaScript with a ________






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






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






6. To assign actions to the window onLoad event






7. Math object method used to return a given number rounded to the next lowest integer value






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






9. The escape sequence used to insert a Unicode character into a string in JavaScript






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






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






12. To get the current value for textboxes






13. The syntax of a conditional operator






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






15. To create a function in JavaScript






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






17. To set focus on the control for textboxes






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






19. When you __________ a javascript variable it retains its original value






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






21. To declare a variable in JavaScript






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






23. To denote a string in JavaScript






24. To code an If statement in JavaScript






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






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






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






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






29. Math object method used to return a random number






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






31. The identity operator for equals






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






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






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






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






36. To concatenate multiple parts into a string






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






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






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






40. To code a for statement in JavaScript






41. To create a single line comment in JavaScript






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






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






44. To insert Javascript into a web page






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






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






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






48. To display a confirmation






49. To set the control to be disabled for textboxes






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