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 access a page element by id






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






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






4. To create an Array object in JavaScript






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






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






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






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






9. The syntax of a conditional operator






10. Math object method used to return a random number






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






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






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






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






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






16. To create a new Date object






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






18. To assign a default value to a prompt






19. To create a single line comment in JavaScript






20. Command to display a prompt






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






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






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






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






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






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






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






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






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






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






31. To display an alert






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






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






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






35. To set the digit precision of a decimal number






36. To code a while statement in JavaScript






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






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






39. To insert Javascript into a web page






40. To display a confirmation






41. To declare a variable in JavaScript






42. To set the control to be disabled for textboxes






43. To set focus on the control for textboxes






44. To test that a variable contains a valid number






45. To assign actions to the window onLoad event






46. String object method used to concatenate multiple strings






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






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






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






50. JavaScript is case _______