• ES7 Optional Chaining
    JavaScript

    Optional Chaining in ES7

    What is optional chaining?Optional chaining allows you to access the value of a property in a nested object without the need to validate each object key/value in the chain. I will try to explain it with an example. I have an object, the value I have is deep inside a nested object. I want to check the value of dataExpiryDays and do something. We can do this like this Wait…. anyone using JavaScript might know the potential dangers of this approach. If any of the nested object is not available or null the above line of code will break. Example if the key edgeReels is not available, you will get…