Skip to main content

Posts

Showing posts with the label Javascript Test Upwork Answers

Javascript Test Upwork Answers 2019

1. Consider the following JavaScript alert: <script type=»text/JavaScript»> function message() { alert(«Welcome to ExpertRating!!!») } </script> Which of the following will run the function when a user opens the page? Answers: • body onload=»message()» • body onunload=»message()» • body onsubmit=»message()» • body onreset=»message()» 2. Which of the following is not a valid method in generator-iterator objects in JavaScript? Answers: • send() • throw() • next() • stop() 3. How can created cookies be deleted using JavaScript? Answers: • They can’t be deleted. They are valid until they expire. • Overwrite with an expiry date in the past • Use escape() on the value of the path attribute • Use unescape() on the value of the path attribute • The cookie file will have to be removed from the client machine. • Wait till the expiry date is reached 4. Which of the following JavaScript Regular Expression modifiers finds one or more occurrences of a specific cha...