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. Math object method used to return a given number rounded to the next lowest integer value






3. The identity operator for equals






4. To declare a variable in JavaScript






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






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






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






8. Math object method used to return a given number rounded to the next highest integer value






9. Statements end in JavaScript with a ________






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






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






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






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






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






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






16. The identity operator for not equal






17. Command to display a prompt






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






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






20. To code a for statement in JavaScript






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






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






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






24. To create a new Date object






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






26. To code a button.onclick event handler






27. To assign actions to the window onLoad event






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






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






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






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






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






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


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






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






36. To create an Array object in JavaScript






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






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






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






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






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






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






43. To create a single line comment in JavaScript






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






45. To access a page element by id






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






47. To denote a string in JavaScript






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






49. String object method used to concatenate multiple strings






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