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 display an alert






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






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






4. To set the digit precision of a decimal number






5. To create a function in JavaScript






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






7. To assign actions to the window onLoad event






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






9. To declare a variable in JavaScript






10. To get the current value for textboxes






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






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






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






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






15. To concatenate multiple parts into a string






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






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






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






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






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






21. Math object method used to return a random number






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. The format to create a new Date object from a string






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






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






27. To denote a string in JavaScript






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






29. This returns only True or false values






30. To assign a default value to a prompt






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






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






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






34. To view the current web address using JavaScript






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






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






37. Command to display a prompt






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






39. To create an Array object in JavaScript






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






41. Date object method used to return a string containing the date






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






43. A statement that yields a value






44. To insert Javascript into a web page






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






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






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






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






49. To set the control to be disabled for textboxes






50. Number object method used to return a number in exponential format with the specified number of decimal places