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. Number object method used to return a string with a given number base






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






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






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






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






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






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






8. Math object method used to return a random number






9. To create a Date object in JavaScript






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






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






12. To test that a variable contains a valid number






13. To create a new Date object






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






15. A statement that yields a value






16. To get the current value for textboxes






17. To set the control to be disabled for textboxes






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






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






20. To denote a string in JavaScript






21. To code a while statement in JavaScript






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






23. The identity operator for equals






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






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






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






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






28. To set the digit precision of a decimal number






29. This returns only True or false values






30. To declare a variable in JavaScript






31. To display an alert






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






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






34. Command to display a prompt






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






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






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






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






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






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






41. To assign actions to the window onLoad event






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






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






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






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






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






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






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






49. To access a page element by id






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