Month: April 2021

Practical Usage of Closure in JavaScript

Closure is a very important concept that every JavaScript developer should understand. In my earlier post, I discussed what is closure and then, some examples to understand this concept. I highly recommend you go through that post and video before going into the details of this post.Blog: Understand JavaScript ClosureVideo: Understand JavaScript ClosureNote – I am sharing all my JavaScript Developer Certification study notes here. Please provide your feedback if you see anything wrong or missing. Appreciate.This post will cover some of the practical use of closures:Private variables and methodsPrivate variables and methods can be implemented using closures.var doOperation = function (value)...

Read More

Understand JavaScript Closure

 Closure is a very important concept that every JavaScript developer should understand. In the post, I will provide a quick introduction of closure and then, I will be focusing on examples so that it will be easier for you to understand this concept. I will be sharing the video as well at the end of this post.Note – I am sharing all my JavaScript Developer Certification study notes here. Please provide your feedback if you see anything wrong or missing. Appreciate.What is a Closure?As per MDN, “A closure is the combination of a function bundled together(enclosed) with references to its surrounding state. In other words, a closure gives you access to an outer function’s scope from an inner function”.With the above example, let’s go through some examples to understand closure in detailsExample 1function sayHello() { var message = “Hello World”; function sayItNow() { console.log(message); } return sayItNow;}var returnFunc = sayHello();returnFunc();Output:Hello WorldExplanation:In the above example, the outer function sayHello creates a variable message, which is then being used inside the inner function sayItNow. Within the inner function, there is no variable declared, but due to closure, it can access the variable declared within the outer function.Example 2function increment() { var number = 10; function printTheNumber() { console.log(number); } number++; return printTheNumber;}var returnFunc = increment();returnFunc();Output:11Explanation:In the above example, the outer function increment creates a variable number, which is then being used inside the inner function printTheNumber. Within the inner function, there is no variable declared, but due to...

Read More

Kitchener Canada Developer Group Event: All about events by Stephan Chandler-Garcia

 Special thanks to our speaker, Stephan Chandler-Garcia, for the session on “All about events”. We discussed about Lightning Message Service, CustomEvent, the EMP API, Platform Events, Change Data Capture, WebSocket, and Consent Events!You can register for all the upcoming sessions from the Kitchener Developer Group here.You can get details (presentation and recording) of all the earlier sessions from the Kitchener Developer Group here.Presentation Kitchener Developer Group’s session on “All about events” from Sudipta Deb ☁...

Read More

Functions in JavaScript

 A JavaScript function is a block of organized, reusable code that is defined to perform a single, relation action. A function is executed when someone calls the function with the name.Note – I am sharing all my JavaScript Developer Certification study notes here. Please provide your feedback if you see anything wrong or missing. Appreciate your help.In JavaScript, functions are treated as first-class because they are treated as values. The example of treating function as values are – We can assign a function to a variableWe can store functions in an arrayA function can be passed to another function as an argumentA function can be assigned to a property of an object.You can find the video where I have explained everything here. I have also included the video at the end of this post.Defining a functionA function is defined with the keyword function followed by the name of the function and then the optional functional parameters. Defining a function will not do anything unless you invoke the function. Below code shows a basic example of defining a function and then invoking the same function.//Defining the functionfunction sayHello(name) { console.log(“Hello, ” + name + ” to the world of JavaScript”);}//invoking the functionsayHello(“Shane James”);Function returning valueBy default, all functions return value, but in the above example, the return value is undefined. We can define the return and then store the return value in some variable like...

Read More

Salesforce Summer ’21 Release Dates and Preview Information

 Salesforce Summer ’21 Release is coming up and I am sure like me, you are also super excited to explore all the cool features that Salesforce will bring along with this release. I will definitely cover items from Salesforce Summer ’21 release in my upcoming posts. But right now, the information we all are looking for – When Summer ’21 release will be applied to my production org?When Summer ’21 release will be applied to my sandboxes?How can I register for pre-release org?What are the new features coming up with this release?When Summer ’21 release will be applied to my Production org?This is a very important thing to know as you need to test Summer ’21 release in your sandboxes making sure all your configuration/customizations are working fine before this date. Depending on your instance of Salesforce, the release date can be different. Main release weekends are below, so your instance will be migrated into Summer ’21 in any of these below dates.May 15th, 2021June 4th, 2021June 11-12th, 2021To know the instance of your Salesforce, you can go to Setup -> Company information, and there you will get to know about the instance.With that information, you can go to Salesforce Trust. Enter the instance name at the top of the search bar, and then click on the instance. Once open, you can click on Maintenance Tab and find the release...

Read More

Earlier Posts

  • 2024 (17)
  • 2023 (47)
  • 2022 (25)
  • 2021 (35)
  • 2020 (41)
  • 2019 (13)
  • 2018 (16)
  • 2017 (14)
  • 2016 (18)
  • 2015 (74)
  • 2014 (20)