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. The _____ attribute is used to denote external file for script use






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






3. To create a new Date object






4. To get the current checked status of the control for checkboxes






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






6. Number object method used to return a number in exponential format with the specified number of decimal places






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






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






9. To assign a default value to a prompt






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






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






12. To create a function in JavaScript






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






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






15. To denote a string in JavaScript






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






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






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






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






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






21. To display a confirmation






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






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






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






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






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






27. Command to display a prompt






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






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






30. The available properties for the Number object: Number.MAX_VALUE - Number.MIN_VALUE - Number.POSITIVE_INFINITY - _______ - Number.NaN






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






32. To declare a variable in JavaScript






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






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






35. To assign actions to the window onLoad event






36. To concatenate multiple parts into a string






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






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






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






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






41. To set the digit precision of a decimal number






42. The syntax of a conditional operator






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






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






45. To access a page element by id






46. String object method used to concatenate multiple strings






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


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






49. To create a single line comment in JavaScript






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