{

Welcome to my blog !


January 1, 0001 ·  0 min read

...

January 1, 0001 ·  0 min read

...

ES11 - Optional Chaining

January 1, 0001 ·  1 min read

Optional Chaining is a feature implemented in Latest javascript. Let’s see what is the problem solve with this feature. For example, An object contains following properties. let employee = { "id":1, "name":"abc" "role" : { "id": 1, "name":"Admin" } } An object contains plain properties as well as sub childs(roles). Let’s find the role id for an employee. let roleId = employee.role.id console.log(roleId) // Prints 1 The above code works and prints role id if employee, and role objects are not null....

Subscribe
You'll get a notification every time a post gets published here.