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. What Date object method is used to return the number of milliseconds since the start of GMT






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






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






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






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






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






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






8. The string escape sequence to insert a backslash in JavaScript






9. The identity operator for equals






10. To declare a variable in JavaScript






11. To get the current value for textboxes






12. To code a for statement in JavaScript






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






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






15. To assign actions to the window onLoad event






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






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






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






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






20. To denote a string in JavaScript






21. This returns only True or false values






22. String object method used to concatenate multiple strings






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






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






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






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 create a new Date object






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






29. To insert Javascript into a web page






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






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






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






33. To code a button.onclick event handler






34. To view the current web address using JavaScript






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






36. The identity operator for not equal






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






38. To create a single line comment in JavaScript






39. To display an alert






40. Math object method used to return a given number rounded to the next lowest integer value






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






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






43. To code an If statement in JavaScript






44. To assign a default value to a prompt






45. The syntax of a conditional operator






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






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






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






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






50. To set focus on the control for textboxes