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 write a line to the current element of the DOM (Document Object Model)






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






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






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






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






6. Statements end in JavaScript with a ________






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






8. To set focus on the control for textboxes






9. To create a single line comment in JavaScript






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






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






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






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






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






15. To code an If statement in JavaScript






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






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






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






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






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






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






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






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






24. To create a function in JavaScript






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






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


27. To denote a string in JavaScript






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






29. To get the current value for textboxes






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






31. This returns only True or false values






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






33. To access a page element by id






34. The identity operator for equals






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






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






37. To create a Date object in JavaScript






38. To assign a default value to a prompt






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






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






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






42. To set the digit precision of a decimal number






43. JavaScript is case _______






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






45. To test that a variable contains a valid number






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






47. To code a for statement in JavaScript






48. Math object method used to return a random number






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






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