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. Math object method used to return a given number rounded to the next highest integer value






2. The syntax of a conditional operator






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






4. To create a single line comment in JavaScript






5. To access a page element by id






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






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






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






9. Command to display a prompt






10. Math object method used to return a random number






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






12. JavaScript is case _______






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






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






15. A statement that yields a value






16. To insert Javascript into a web page






17. To display an alert






18. To code a button.onclick event handler






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






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






21. To assign a default value to a prompt






22. To code a for statement in JavaScript






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


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






25. To set focus on the control for textboxes






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






27. To code an If statement in JavaScript






28. To denote a string in JavaScript






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






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






31. The identity operator for not equal






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






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






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






35. To display a confirmation






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






37. To view the current web address using JavaScript






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






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






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






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






42. To get the current value for textboxes






43. To declare a variable in JavaScript






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






45. To create a new Date object






46. Date object method used to return a string containing the date






47. The identity operator for equals






48. To set the digit precision of a decimal number






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






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