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 create a Date object in JavaScript






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






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






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






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


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






7. Math object method used to return a random number






8. To display an alert






9. To insert Javascript into a web page






10. The identity operator for not equal






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






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






13. To set focus on the control for textboxes






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






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






16. The identity operator for equals






17. To declare a variable in JavaScript






18. To assign actions to the window onLoad event






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






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






21. To code a button.onclick event handler






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






23. When you add a string and a number the result will be a ____






24. Command to display a prompt






25. To denote a string in JavaScript






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






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






28. To view the current web address using JavaScript






29. To code an If statement in JavaScript






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






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






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






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






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






35. To display a confirmation






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






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






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






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






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






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






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






43. To access a page element by id






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






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






46. To set the control to be disabled for textboxes






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






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






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






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