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 assign the value from a prompt to a string






2. To display a confirmation






3. String object method used to get the character at a specified index position






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






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






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






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






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






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






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






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






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






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






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






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






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






17. To code a button.onclick event handler






18. To create a function in JavaScript






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

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


20. To create an Array object in JavaScript






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






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






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






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






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






26. To set the control to be disabled for textboxes






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






28. To set the digit precision of a decimal number






29. Statements end in JavaScript with a ________






30. To code a while statement in JavaScript






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






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






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






34. To view the current web address using JavaScript






35. To create a new Date object






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






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






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






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






40. The identity operator for not equal






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






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






43. To access a page element by id






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






45. This returns only True or false values






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






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






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






49. To display an alert






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