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 display an alert






2. Command to display a prompt






3. To set the control to be disabled for textboxes






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






5. To display a confirmation






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






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






8. Math object method used to return a random number






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






10. Statements end in JavaScript with a ________






11. The identity operator for not equal






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






13. The syntax of a conditional operator






14. To access a page element by id






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






16. To code an If statement in JavaScript






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






18. To get the current value for textboxes






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






20. To create a Date object in JavaScript






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






22. To create an Array object in JavaScript






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






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






25. String object method used to concatenate multiple strings






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






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






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






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






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






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






32. To assign actions to the window onLoad event






33. To test that a variable contains a valid number






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






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






36. To set focus on the control for textboxes






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


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






39. To create a function in JavaScript






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






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






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






43. To set the digit precision of a decimal number






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






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






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






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






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






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






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