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 code an If statement in JavaScript






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






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






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






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






6. To test that a variable contains a valid number






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






8. To concatenate multiple parts into a string






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






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






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






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






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






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






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






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






17. To create a single line comment in JavaScript






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






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






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






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






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






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






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






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






26. This returns only True or false values






27. Statements end in JavaScript with a ________






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






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






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






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






32. To code a while statement in JavaScript






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






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






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






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






37. To code a for statement in JavaScript






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






39. To set the control to be disabled for textboxes






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






41. To denote a string in JavaScript






42. The syntax of a conditional operator






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






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






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






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






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






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






49. To view the current web address using JavaScript






50. Command to display a prompt