Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Salesforce JavaScript Developer Study Guide: Asynchronous JavaScript and DOM Manipulation, Exams of Advanced Education

This comprehensive study guide provides a deep dive into the essential concepts of asynchronous javascript, focusing on promises, async/await syntax, and event handling. It also covers dom manipulation, including methods for creating, inserting, and manipulating dom elements, as well as working with local storage, geolocation, and browser apis. The guide also covers advanced topics such as closures, generators, decorators, and modules. Ideal for university students and lifelong learners looking to enhance their javascript skills for salesforce development.

Typology: Exams

2023/2024

Available from 04/24/2024

carol-njeri
carol-njeri 🇺🇸

4.5

(2)

1.7K documents

1 / 9

Toggle sidebar

Related documents


Partial preview of the text

Download Salesforce JavaScript Developer Study Guide: Asynchronous JavaScript and DOM Manipulation and more Exams Advanced Education in PDF only on Docsity! Salesforce Javascript Developer 1 study guide complete update 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 - Hard Reload - Empty Cache and Hard Reload DevTools must be open to access these options. This method creates a table body - CORRECT ANSWER table.createTBody() This method inserts a table row - CORRECT ANSWER table.insertRow() What are two ways to listen for events in js? - CORRECT ANSWER - addEventListener() - an onevent handler (onclick, onmouseup, etc.) What are the two phases of event propagation in modern browsers? - CORRECT ANSWER - bubbling (goes from target to outermost ancestor) - capturing (goes from outermost ancestor to target) How is a custom event created and dispatched? - CORRECT ANSWER 1. CustomEvent() to create 2. dispatchEvent() to dispatch ex: const myEvent = new customEvent( What objects can addEventListener() target? - CORRECT ANSWER Any object that supports events, including Element, Document, and Window What parameters can be passed to addEventListener()? - CORRECT ANSWER - an options object - useCapture (true or false) What are some benefits to using addEventListener()? - CORRECT ANSWER - can use multiple handlers for one event - allows controlling phase (bubbling/capturing) when activated 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) - init, an object which can contain options such as: - method - headers - body - mode - credentials The fetch() method returns a ______ it can be called using these keywords: _____ - CORRECT ANSWER - promise - async / await The Geolocation API can be accessed through a call to - CORRECT ANSWER navigator.geolocation Location information can be accessed using - CORRECT ANSWER - Geolocation.getCurrentPosition() (current location) - Geolocation.watchPosition() (execute a function when the location changes) What parameters do Geolocation.getCurrentPosition() and Geolocation.watchPosition() accept? - CORRECT ANSWER - a success callback (required) - an error callback (optional) - a PositionOptions object (optional) What methods can be used to move through the user's history? - CORRECT ANSWER - back() - forward() - go() Where does history.pushState() add a page to the browser history? - CORRECT ANSWER at the top of the stack history.replaceState() replaces - CORRECT ANSWER the current history entry When the active history entry changes, this event is triggered - CORRECT ANSWER popstate What arguments do history.replaceState() and history.pushState() take? - CORRECT ANSWER - state (ex: {page: 3}) - title - url The popstate event is fired when - CORRECT ANSWER The active history entry changes while the user navigates the session history The URL API provides these two interfaces - CORRECT ANSWER - URL - URLSearchParams List web storage API methods to 1. retrieve 2. set 3. remove 4. clear all keys from storage - CORRECT ANSWER 1. Storage.getItem() 2. Storage.setItem() 3. Storage.removeItem() 4. Storage.clear() A cookie is set by - CORRECT ANSWER document.cookie = 'key=value;' Where can local storage, session storage and cookie data be viewed in the Chrome DevTools? - CORRECT ANSWER Application -> Storage Functions can't be nested in js (T/F) - CORRECT ANSWER False What is the difference in the value of the this keyword in traditional vs. arrow functions? - CORRECT ANSWER Traditional: the object that invoked the function, or else the global object Arrow: doesn't default to the global object. The value of this is determined by context A higher order function is - CORRECT ANSWER A function that takes a function as its inputs or creates a function as its output. What is hoisting? - CORRECT ANSWER Hoisting makes it so a function can be called before it is declared. This doesn't happen for function expressions. Closure allows code to - CORRECT ANSWER access its parent scope, even after that code has finished
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved