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 identity operator for equals






2. To set the control to be disabled for textboxes






3. To create a function in JavaScript






4. To assign actions to the window onLoad event






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






6. To declare a variable in JavaScript






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






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






9. To get the current value for textboxes






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






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






12. Statements end in JavaScript with a ________






13. Math object method used to return the highest value from a set of supplied numbers






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






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






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






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






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






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






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






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






22. A statement that yields a value






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






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






25. To create a Date object in JavaScript






26. To denote a string in JavaScript






27. To view the current web address using JavaScript






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






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






30. The identity operator for not equal






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






32. The string escape sequence to start a new line in JavaScript






33. To create a new Date object






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






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






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






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






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






39. To set the digit precision of a decimal number






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






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






42. To display a confirmation






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






44. To insert Javascript into a web page






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






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






47. To concatenate multiple parts into a string






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






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






50. To test that a variable contains a valid number