Two ways you can take advantage of types in JavaScript (without TypeScript)
blinkingcaret.com