cover-img

#Day4 - Type Annotation vs Type Inference

1 September, 2022

0

0

0

Type Annotation

Type Annotation means we explicitly tell the Typescript about the type.

Type Inference

Type Inference means we didn't tell the type, but let Typescript figure it out. From the code above, we don't write the type of website variable, but the initial value of it are string. So, when
So, when we try to reassign it with another type, TS will throw an error.

0

0

0

Fathan Margono

Jakarta, Indonesia

Self-taught software engineer with 6 years of experience, passionate about JavaScript and user-friendly interfaces, constantly seeking new challenges.

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2025. Showcase Creators Inc. All rights reserved.