DEV Community

Cover image for Best tip for GoLang programmers learning TypeScript

Best tip for GoLang programmers learning TypeScript

Ayrton Fidelis
Someone hungry for every bit of Web Development. Let's have dinner together!
・1 min read

I've been playing with GoLang recently, pretty cool language actually, but comming from a TypeScript world it was quite weird to me to use the nil keyword instead of null. I figured out that it could also be weird for Go devs learning TS, so here goes a little something to make the transition smoother:

const nil = null;

Enter fullscreen mode Exit fullscreen mode

With that in place, Go devs are now able to use the familiar keyword instead of the longer alternative.

Discussion (1)

avantar profile image
Krzysztof Szala

Finally some high quality content on 😂

Forem Open with the Forem app