Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript has 7 primitive types #31

Open
wisammechano opened this issue Jun 25, 2022 · 1 comment
Open

JavaScript has 7 primitive types #31

wisammechano opened this issue Jun 25, 2022 · 1 comment
Assignees

Comments

@wisammechano
Copy link
Contributor

wisammechano commented Jun 25, 2022

In most textbooks and at MDN it is mentioned that JavaScript has 7 primitive types. However, in this lesson, we say there are 3.

JavaScript has three primitive types -- `string`, `number`, `boolean` -- and they are present in TypeScript as well. You can declare them just as you would in JavaScript. However, in TypeScript, you may _optionally_ add a type. As mentioned previously, in most cases TypeScript can infer the type correctly.

I understand the authors meaning for the example but we may need to adjust the wording.

@Shrreya
Copy link
Member

Shrreya commented Jun 27, 2022

Would it be better to say "three frequently used primitive types"?
And we can also link the MDN resource as a reference for learning about all primitive types.

@wisammechano wisammechano self-assigned this Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants