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 create a single line comment in JavaScript






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






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






4. To get the current value for textboxes






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






6. To set focus on the control for textboxes






7. To create a function in JavaScript






8. This returns only True or false values






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






10. To create an Array object in JavaScript






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






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






13. To code a button.onclick event handler






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






15. Number object method used to round numbers to the specified number of decimal places






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






17. The two methods common to most controls: ______ //Brings focus to the control blur //Removes focus from the control






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






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






20. To assign actions to the window onLoad event






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






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






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






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






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






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






27. To test that a variable contains a valid number






28. To set the digit precision of a decimal number






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






30. To concatenate multiple parts into a string






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






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






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






34. To display a confirmation






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






36. To assign the value from a prompt to a non-string variable






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






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






39. String object method used to concatenate multiple strings






40. The string escape sequence to insert a single quote in JavaScript

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






42. To code a for statement in JavaScript






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






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






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






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






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






48. To create a Date object in JavaScript






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






50. To assign a default value to a prompt