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. The string escape sequence to insert a single quote in JavaScript


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






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






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






6. To assign actions to the window onLoad event






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






8. To create a Date object in JavaScript






9. This returns only True or false values






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






11. To assign a default value to a prompt






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






13. The available properties for the Number object: Number.MAX_VALUE - Number.MIN_VALUE - Number.POSITIVE_INFINITY - _______ - Number.NaN






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






15. The syntax of a conditional operator






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






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






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






19. JavaScript is case _______






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






21. Number object method used to return a string with a given number base






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






23. To access a page element by id






24. To code an If statement in JavaScript






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






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






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






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






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






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






31. To get the current value for textboxes






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






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






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






35. To create a new Date object






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






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






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






39. A function that is called with a certain event occurs - e.g. button.onclick and window.onload.






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






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






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






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






44. To display a confirmation






45. To denote a string in JavaScript






46. String object method used to concatenate multiple strings






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






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






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






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