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 number in exponential format with the specified number of decimal places






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






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






4. To display a confirmation






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






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






7. To create a function in JavaScript






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






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






10. To display an alert






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






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






13. The identity operator for not equal






14. To assign a default value to a prompt






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






16. To set the digit precision of a decimal number






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






18. JavaScript is case _______






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






20. To insert Javascript into a web page






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






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






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






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






25. To create an Array object in JavaScript






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






27. The syntax of a conditional operator






28. To denote a string in JavaScript






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






30. To access a page element by id






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






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






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






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


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






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






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






38. To assign actions to the window onLoad event






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






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






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






42. To code a for statement in JavaScript






43. To create a single line comment in JavaScript






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






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






46. To code a button.onclick event handler






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






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






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






50. To set the control to be disabled for textboxes