Skip to main content

Posts

Showing posts from July, 2020

Modern ES6 JavaSript Functions

Learning Objectives After completing this blog, you’ll be able to: Recognize the fat arrow syntax for functions. Describe the scope used with the this keyword. Explain why defining optional parameters in ES6+ results in cleaner code. Describe the different uses for the ‘...’ operator. The Trouble with This You’re probably familiar with defining functions like this: let result = function ( i , j ) { return i + j ; } console . log ( result ( 2 , 3 ) ) ; Copy Executing that bit of code displays 5 in the console. ES6 introduced a shorter way to define functions using what is called arrow functions. If you are coming from another language such as C#, then arrow functions will look pretty similar to something you know as lambda expressions.  Using the fat arrow symbol ( => ), you can now create the same function using code like this: let result = ( i , j ) = > i + j ; console . log ( result ( 2 , 3 ) ) ; Copy All we have done here is remove the  function ...

Commonly asked Lightning Developer Interview Questions & Answers

1. Where can we use Lightning Components? We can use Lightning Components in the following places: Drag-and-drop Components in the Lightning App Builder and Community Builder. Add Lightning Components to Lightning Pages. Add Lightning Components to Lightning Experience Record Pages. Launch a Lightning Component as a Quick Action Override Standard Actions with Lightning Components Create Stand-Alone Apps 2. How do you build Lightning Components? We can build Lightning Components using two programming models: the Lightning Web Components model, and the original Aura Components model. 3. How can you create Lightning Record Pages in Salesforce, and what are the different types? We can make use of Lightning App Builder for creating Lightning Record Pages, to create the following three types of pages: App Page Home Page Record Page 4. What options are there for Lightning Record Page assignment? “Lightning Pages” can be assigned at three different levels: The org default App default – this ov...