5 New JavaScript Features in ES 2020 â Brain Mentors
Written by Harish Kumar
In this Blog we are going to learn ES 2020 Key Features.ES2020 released on Start of this year.
Here we are going to learn some really cool features of ES 2020
Let’s start with Feature 1 : Nullish coalescingr
Use when the value is missing (undefined or null (It doesn’t work with NaN , ‘’, 0)).
The undefined and null are the nullish value , and you want to handle it then we use nullish coalescing operator.
Example:
imager
In above example , country is not there so it does show undefined And I want to print some meaningful resultr
Before ES 2020 we use truthy and falsyrnimager
It just checks if the first value is true then don’t go to the second value ,
if first is false (undefined or null ) then go to the second value.
Instead of PIPE Now Use Nullish Operator from ES 2020rnimage
Feature 2 : Optional Chaining Operatorr
Nested Object Property access can be dangerous , if any of the property is null or undefined.
Example :
image
Read Full Article Here – https://brain-mentors.com/5-new-javascript-features-in-es-2020-brain-mentors/
Article author
About the Author
BRAIN MENTORS Pvt. Ltd. started with a mission to link the IT industry and educational institutions. We aim to transform our every student into an IT professional who is ready to be employed in the industry.
Further reading
Further Reading
Article
Using Quotes to Enhance Everyday Communication
In the realm of communication, the strategic use of quotes can transform mundane conversations into memorable exchanges. Whether it's in a professional presentation, a casual chat, or during a crucial negotiation, weaving in well-chosen quotes can enhance the impact of your words. Here's how integrating quotes into everyday communication can enrich your interactions and make your dialogue more engaging and persuasive. Establish Credibility and Authority Starting with a
March 8, 2025
Article
Understanding Neighborhood Appeal and Market Analysis: A Guide for Homebuyers
When buying a home, two key elements can heavily influence your decision-making process: neighborhood appeal and comparative market analysis (CMA). Understanding these aspects not only helps you find a home that meets your lifestyle needs but also ensures you're making a financially sound investment. In this guide, we’ll explore what makes a neighborhood appealing and how a CMA can provide insights into the real estate market, equipping you with the knowledge to make in
September 26, 2024
Article
Boost Solar Sales & ROI with an Optimized Appointment Strategy
In the competitive world of solar energy, every lead counts. Turning those leads into sales and maximizing your return on investment (ROI) requires a strategic approach, especially when it comes to scheduling appointments. Here's how you can optimize your appointment strategy to boost solar sales and achieve long-term success. Qualify Leads Before Scheduling Not all leads are created equal. Before scheduling appointments, invest time in qualifying leads to identify those with
July 12, 2024