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 test that a variable contains a valid number






2. To concatenate multiple parts into a string






3. Math object method used to return a random number






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






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






6. JavaScript is case _______






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






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






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






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






11. To code a for statement in JavaScript






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


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






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






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






16. The syntax of a conditional operator






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






18. To code a button.onclick event handler






19. To create a function in JavaScript






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






21. To access a page element by id






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






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






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






25. To display an alert






26. To display a confirmation






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






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






29. To create a new Date object






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






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






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






33. This returns only True or false values






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






35. To set the digit precision of a decimal number






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






37. A statement that yields a value






38. Math object method used to return the square root of a given number






39. To denote a string in JavaScript






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






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






42. To create a single line comment in JavaScript






43. To code a while statement in JavaScript






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






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






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






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






48. To create a Date object in JavaScript






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






50. To view the current web address using JavaScript