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. The string escape sequence to insert a tab in JavaScript






2. To declare a variable in JavaScript






3. To get the current value for textboxes






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






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






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






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






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






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






10. To set the digit precision of a decimal number






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






12. To create a Date object in JavaScript






13. To concatenate multiple parts into a string






14. To insert Javascript into a web page






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






16. JavaScript is case _______






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






18. To create a new Date object






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






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






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






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






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






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






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






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






27. To create a single line comment in JavaScript






28. To assign actions to the window onLoad event






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






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






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






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






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






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






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






36. Statements end in JavaScript with a ________






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






38. To code a for statement in JavaScript






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






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






41. To create an Array object in JavaScript






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






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






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






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






46. This returns only True or false values






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






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






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






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