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 alter the value of the text element in a span tag






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






3. To create a Date object in JavaScript






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






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






6. To code a button.onclick event handler






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






8. To access a page element by id






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






10. To create a single line comment in JavaScript






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






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






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






14. Number object method used to return a number in exponential format with the specified number of decimal places






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






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






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






18. To concatenate multiple parts into a string






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






20. To set the control to be disabled for textboxes






21. To test that a variable contains a valid number






22. To view the current web address using JavaScript






23. To display a confirmation






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






25. The syntax of a conditional operator






26. To display an alert






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






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






29. To create an Array object in JavaScript






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






31. Math object method used to return a random number






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






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






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






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






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






37. Command to display a prompt






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






39. The identity operator for equals






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






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






42. To set the digit precision of a decimal number






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






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






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






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






47. To get the current value for textboxes






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






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






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