Skip to content

Instantly share code, notes, and snippets.

@IntegerMan IntegerMan/Nullish.ts
Last active Nov 8, 2019

What would you like to do?
// Old Way
var calculator = someCalculator;
if (calculator !== null && calculator !== undefined) {
calculator = new Calculator();
// New Way
var calculator = someCalculator ?? new Calculator();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.