DEV Community

Louis
Louis

Posted on

2 2

Notes on default ES behavior

const n = null

console.log(n?.something) // undefined

const o = {}

console.log(o?.something) // undefined

function test(d = 0) {
    console.log({ d })
}

test(o?.something) // { d : 0 }
test(n?.something) // { d : 0 }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more