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 declare a variable in JavaScript






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






3. To set the control to be disabled for textboxes






4. To display a confirmation






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






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






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






8. To concatenate multiple parts into a string






9. To code an If statement in JavaScript






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






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






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






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






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






15. To assign a default value to a prompt






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






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






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






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






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






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






22. To get the current value of the control for a text area






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






24. To set focus on the control for textboxes






25. To get the current value for textboxes






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






27. Statements end in JavaScript with a ________






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






29. JavaScript is case _______






30. String object method used to concatenate multiple strings






31. To set the digit precision of a decimal number






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






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






34. To view the current web address using JavaScript






35. To insert Javascript into a web page






36. To create an Array object in JavaScript






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






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






39. To assign actions to the window onLoad event






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






41. The _____ attribute is used to denote external file for script use






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






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






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






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






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






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






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


49. This returns only True or false values






50. To create a single line comment in JavaScript