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






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






3. The identity operator for equals






4. To create an Array object in JavaScript






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






6. JavaScript is case _______






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






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






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






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






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






12. Math object method used to return a random number






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 return value of confirm() to a variable






15. To access a page element by id






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






17. This returns only True or false values






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






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






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






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






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






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






24. To code a button.onclick event handler






25. To assign actions to the window onLoad event






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






27. String object method used to return the position of the first instance of a specified search string starting from the specified index






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






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






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






31. To assign a default value to a prompt






32. To code a while statement in JavaScript






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






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






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


36. To create a new Date object






37. To code a for statement in JavaScript






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






39. To code an If statement in JavaScript






40. To declare a variable in JavaScript






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






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






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






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






45. To create a Date object in JavaScript






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






47. To create a single line comment in JavaScript






48. To get the current value for textboxes






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






50. To display a confirmation