DEV Community

Discussion on: “Communicating your needs” / TypeScript’s value from a Buddhist perspective (part 1)

Collapse
 
seyfer profile image
Oleg Abrazhaev

Wait, shouldn't the check
if(newUserToSave.lastName)
be
if(!newUserToSave.lastName)

? :D

Collapse
 
cubiclebuddha profile image
Cubicle Buddha • Edited

Thank you so much for finding that and pointing it out. I've corrected the example. Ironically, you kind of illustrated how easy it is to make a mistake in JS because I wrote that example without VSCode's help. If I had written that example in TypeScript I wouldn't have been able to make the mistake.