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. When you add a string and a number the result will be a ____






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






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






4. To test that a variable contains a valid number






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






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






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






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






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






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






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






12. To code a for statement in JavaScript






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






14. To create a Date object in JavaScript






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






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






17. The identity operator for not equal






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






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






20. To display an alert






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






22. This returns only True or false values






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






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






25. To assign a default value to a prompt






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






27. To create a function in JavaScript






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






29. To set the control to be disabled for textboxes






30. To assign the value from a prompt to a string






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






32. To set focus on the control for textboxes






33. To assign actions to the window onLoad event






34. To denote a string in JavaScript






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






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






37. To set the digit precision of a decimal number






38. To insert Javascript into a web page






39. The events common to most controls: onfocus - onblur - onclick - _______ - onchange - onselect






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






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






42. To concatenate multiple parts into a string






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






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






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






46. String object method used to concatenate multiple strings






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






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






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






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