The videos shows you how to use the null coalescing operator (??) instead of logical or (||) to set default values in TypeScript 3.7 to prevent expected bugs in your code.
For correct I would have used
val != null ? val : 0.5
.
However, the new operator will make this even shorter and more readable, very nice!
Is this only a TS feature or will this go into the coming ES releases?
There's a TC39 proposal to add it to ES.