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 string escape sequence to insert a tab in JavaScript






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






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






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






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






6. To set the control to be disabled for textboxes






7. The syntax of a conditional operator






8. To code a while statement in JavaScript






9. To declare a variable in JavaScript






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






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






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






13. Statements end in JavaScript with a ________






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






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






16. A statement that yields a value






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






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






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






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






21. To view the current web address using JavaScript






22. To get the current value for textboxes






23. To insert Javascript into a web page






24. To create a Date object in JavaScript






25. To assign actions to the window onLoad event






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






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






28. What Date object method is used to return the number of milliseconds since the start of GMT






29. To create a function in JavaScript






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






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






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






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






34. To display an alert






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






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






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






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






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






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






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






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






43. To code an If statement in JavaScript






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






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






46. Math object method used to return a random number






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






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






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






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