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 get the value or the currently selected item for lists






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






3. To create an Array object in JavaScript






4. To view the current web address using JavaScript






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






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






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






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






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






10. To display an alert






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






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






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






14. This returns only True or false values






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






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






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






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






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






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






21. To create a function in JavaScript






22. A statement that yields a value






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






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






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






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






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






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


29. To code a button.onclick event handler






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






31. To code a for statement in JavaScript






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






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






34. To code a while statement in JavaScript






35. To test that a variable contains a valid number






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






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






38. The identity operator for equals






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






40. To create a Date object in JavaScript






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






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






43. To display a confirmation






44. To access a page element by id






45. Math object method used to return a random number






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






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






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






49. To set focus on the control for textboxes






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