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. A statement that yields a value






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






3. To test that a variable contains a valid number






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






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






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






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






8. To create a Date object in JavaScript






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






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






11. JavaScript is case _______






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






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






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






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






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






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






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






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






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






21. To display a confirmation






22. To code a while statement in JavaScript






23. To set the digit precision of a decimal number






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






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






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






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






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






29. The syntax of a conditional operator






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






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






32. To display an alert






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






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






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






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






37. To write a line to the current element of the DOM (Document Object Model)






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






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






40. Command to display a prompt






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






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


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






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






45. String object method used to concatenate multiple strings






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






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






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






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






50. The identity operator for equals