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 access a page element by id






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






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






4. To set the digit precision of a decimal number






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






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






7. Command to display a prompt






8. To display a confirmation






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






10. The syntax of a conditional operator






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






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






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






14. To create an Array object in JavaScript






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






16. To code an If statement in JavaScript






17. To assign a default value to a prompt






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






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






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






21. To create a Date object in JavaScript






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






23. To insert Javascript into a web page






24. To create a function in JavaScript






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






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






27. To create a single line comment in JavaScript






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






29. The identity operator for equals






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






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






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






33. To get the current value for textboxes






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






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






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






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






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






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






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






41. To code a for statement in JavaScript






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


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






44. JavaScript is case _______






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






46. To display an alert






47. To test that a variable contains a valid number






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






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






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