





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






A promise is - CORRECT ANSWER an object returned by asynchronous code async/await syntax is syntactic sugar for - CORRECT ANSWER promises the async keyword is added to the front of a - CORRECT ANSWER function that should contain asynchronous code the await keyword is added to the front of an asynchronous function call that returns - CORRECT ANSWER a promise the insertAfter() method can be used to add an element to the DOM after a given element (T/F) - CORRECT ANSWER False. There is an insertBefore() method but no insertAfter() method. A javascript object can be stored in a browser's localStorage using - CORRECT ANSWER JSON.stringify() What are the additional reload options available via long click in Chrome? - CORRECT ANSWER - Normal Reload
This method inserts a table row - CORRECT ANSWER table.insertRow() What are two ways to listen for events in js? - CORRECT ANSWER - addEventListener()
How can elements be retrieved by class or tag name? - CORRECT ANSWER - getElementsByClassName()
What browser API can be used to get the device location? - CORRECT ANSWER Geolocation What browser API can be used to send notifications to the user? - CORRECT ANSWER Notifications What browser API can be used to store data client-side? - CORRECT ANSWER Web Storage What parameters does fetch() take? - CORRECT ANSWER - the path to the resource (required)
Give an example of apply(), call() and bind() - CORRECT ANSWER How is a generator function declared? - CORRECT ANSWER function* funcName() {//code here yield value; } a decorator is - CORRECT ANSWER a wrapper function that extends an existing function A class can contain two constructors (T/F) - CORRECT ANSWER False A variable imported from a module can be updated outside of the module (T/F) - CORRECT ANSWER False (there could be functions from the module that update it) What method can be used to prevent an object's properties from being changed? - CORRECT ANSWER Object.freeze(obj) The arguments object of a function contains - CORRECT ANSWER all the values passed to the function in an array-like collection of values, and is only available for non-arrow functions How many parameters are passed to a decorator when it is used to decorate a class? - CORRECT ANSWER 1 Multiple decorators are allowed to be used in classes and class properties (T/F) - CORRECT ANSWER True, and the closest decorator is evaluated first How can a function be exported from a module so that it can be imported with any name? - CORRECT ANSWER export default function functionName()