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 events common to most controls: onfocus - onblur - onclick - _______ - onchange - onselect






2. To assign actions to the window onLoad event






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






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






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






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






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






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






9. To code a button.onclick event handler






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


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






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






13. A statement that yields a value






14. To denote a string in JavaScript






15. To set focus on the control for textboxes






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






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






18. JavaScript is case _______






19. The identity operator for not equal






20. To create a new Date object






21. To declare a variable in JavaScript






22. The syntax of a conditional operator






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






24. To get the current value for textboxes






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






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






27. To test that a variable contains a valid number






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






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






30. To access a page element by id






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






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






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






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






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






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






37. To code a while statement in JavaScript






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






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






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






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






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






43. To insert Javascript into a web page






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






45. To assign a default value to a prompt






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






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






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






49. Statements end in JavaScript with a ________






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