DEV Community

Discussion on: JS interview in 2 minutes / Static vs Dynamic typing

kozlovzxc profile image
Nikita Kozlov Author

Hey 👋 Yep, it's correct.

As for the question, type checks are performed during build time, so it won't affect runtime in any means. Dynamic type checks are more like checks if there is a given property and that's it.

Btw, this only addressing JS/TS, because I've heard that type checks in Python are performed during runtime, which may introduce some overhead.

Also, you can play with typescript in its playground.