The Javascript Developer 1 certification is a relatively new exam which puts an even bigger focus on the UX and the features we add on top of Salesforce. In many scenarios during Salesforce implementations, we find ourselves required to provide very specific UX. UX for different users to support their day-to-day work. The expectations of users out of Salesforce and the level of automation users expect is growing constantly.
Javascript allows us to add this client-side logic to the features we build. This further enhances solutions and improves user experience. Speaking for myself, usually, when I had to develop some client-side logic in Javascript I used to search for something that works. I would do this without truly understanding how Javascript works. It was even harder when things didn’t work as expected and I then had to debug my own code.
The Salesforce Javascript exam really focuses on the basics of Javascript, the scope of variables, different types of functions, basic types and object prototypes. It then adds a more advanced understanding of Javascript, using asynchronies code, timeouts and promises. Focusing on the order of execution and how Javascript works behind the scenes. Now it’s going to be easier to write Javascript code properly and to debug any issues.
Here are a few tips and topics of Javascript (some of them were new to me) to focus on while studying for the exam:
- Review the Promise() function in Javascript, how it works and when is it executed. How it handles Reject(), Resolve() and the followup functions Then(), Catch() and Finally(). Make sure you know the difference between race(), all() and allSettled().
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all - Understand the states of a promise and the methods that can force the promise function to reach those states or other ways for the promise to reach those states.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
- Debugging in browsers.
https://javascript.info/debugging-chrome - Make sure you understand the event loop, microtasks and macrotasks:
https://javascript.info/event-loop - Go over the scope of variables and the difference between "let" and "var". Also, make sure you understand their scope within different types of functions.
https://javascript.info/closure
https://javascript.info/var - Make sure you understand how classes work, the difference between function declarations and class declarations. Look into OOP in Javascript, how to extend a class, how to call its constructor, what’s allowed and what’s not.
https://javascript.info/classes
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes - Check out the private variable syntax.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields - Review what does Hoisting mean in Javascript.
https://developer.mozilla.org/en-US/docs/Glossary/Hoisting - Go over the syntax of arrow function.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions - Review Currying function and the difference between f(a, b, c) and f(a)(b)(c).
https://javascript.info/currying-partials - Make sure you understand how different CSS selectors work (they can be passed as parameters to different functions, like querySelectorAll)
https://www.w3schools.com/cssref/css_selectors.asp - Make sure you understand how each array method works. Some of them are quite common and easy to understand but I found a few like reduce() and some(). Look into the smaller details of how push() works, how concat() works, unshift(), what each does on the original array and what they return.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array - Learn how to handle maps and objects in Javascript:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map - Review the object methods and what they do
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object - Go over seal(), freeze() and preventExtensions(). Really important to understand the differences, what will each let you do or won’t let you do.
- Review how to work with objects and their properties:
https://www.w3schools.com/js/js_object_properties.asp - Tip: Make sure you understand what does it mean that Javascript is an untyped language compared to Java, Apex, C# etc.
- Go over the try, catch and error handling in Javascript. Make sure you understand when “finally” will be called, when errors are handled and by what scope.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch - Review template literals.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals - Review how target.addEventListener() works and the order events will be fired. Make sure you understand the bubbling, target and capturing states. How Javascript finds an element and when each event is fired in those stages (or how events can be added to different stages).
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
https://javascript.info/bubbling-and-capturing - Review the base types in Javascript (make sure you know what's the type of NaN, null, Date(), [1,2,3,4]. Tip: Make sure you know how each type will be converted to a string or how the “+” or “-” sign will impact different types.
https://www.w3schools.com/js/js_type_conversion.asp
-
Go over the 8 basic data types in Javascript String, Number, BigInt, Boolean, null, undefined, Object, Symbol.
-
Check how destructing assignment works.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators -
Go over how to send and receive data using Node.js and how to connect to MySQL database.
-
Go over the websocket methods and events.
https://www.tutorialspoint.com/html5/html5_websocket.htm -
Review Node.js version dependencies using ~ and ^.
-
Review the History interface, the pushState() method and the popstate event.
https://developer.mozilla.org/en-US/docs/Web/API/History -
Review the call(), apply() and bind() functions.
https://medium.com/@omergoldberg/javascript-call-apply-and-bind-e5c27301f7bb -
Go over the XMLHttpRequest class, how to use it and its methods.
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest -
Make sure you understand what WeakMap does.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
For more information on Salesforce Javascript Developer 1 exam click here.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Today's post is by one of our CTO, Or Weissler.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
As always, thanks for reading, if you enjoyed this post please feel free to share it and tag us @Pexlify.
Pexlify is a leading digital transformation partner with Salesforce.com.
Want to know more about our Salesforce Solutions? Contact us today to set up a hassle-free consultation.