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






2. Command to display a prompt






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






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






5. To display an alert






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






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






8. To insert Javascript into a web page






9. String object method used to concatenate multiple strings






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






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






12. To code a while statement in JavaScript






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






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






15. To code an If statement in JavaScript






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






17. The syntax of a conditional operator






18. To code a for statement in JavaScript






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






20. The identity operator for equals






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






22. To set the control to be disabled for textboxes






23. String object method used to return a new string that contains part of the original string from the specified start position






24. To create a single line comment in JavaScript






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






26. To set the digit precision of a decimal number






27. To code a button.onclick event handler






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






29. To access a page element by id






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






31. To create a new Date object






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






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


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






35. The identity operator for not equal






36. When you add a string and a number the result will be a ____






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






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






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






40. To assign a default value to a prompt






41. To test that a variable contains a valid number






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






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






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






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






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






47. To create a Date object in JavaScript






48. Date object method used to return a string containing the time






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






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