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. Number object method used to return a numerical string with the specified number of significant digits






2. To code a button.onclick event handler






3. To test that a variable contains a valid number






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






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






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






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






8. To denote a string in JavaScript






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






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






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






12. The four attributes of the <script> tag:Type - Src - _____ and Defer






13. To create a single line comment in JavaScript






14. The string escape sequence to insert a form feed in JavaScript






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






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






17. The syntax of a conditional operator






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






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






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






21. To declare a variable in JavaScript






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






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






24. To set the digit precision of a decimal number






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






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






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






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






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






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






31. Command to display a prompt






32. To code a while statement in JavaScript






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






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






35. To display an alert






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






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






38. To set the control to be disabled for textboxes






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


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






41. The identity operator for equals






42. To assign a default value to a prompt






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






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






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






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






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






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






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






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