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

Class Names are PascalCase not CamelCase! #910

Open
iHapiW opened this issue Jan 12, 2024 · 3 comments
Open

Class Names are PascalCase not CamelCase! #910

iHapiW opened this issue Jan 12, 2024 · 3 comments

Comments

@iHapiW
Copy link

iHapiW commented Jan 12, 2024

On day 15, you mentioned that class names should be CamelCase

To define a class in JavaScript we need the keyword class , the name of a class in CamelCase and block code(two curly brackets). Let us create a class name Person.

which is not true, it should be Pascal Case, aka Upper Camel Case, not Camel Case. examples also follow the Pascal Case format.

@iHapiW iHapiW changed the title Class Names are Pascal Case not Camel Case! Class Names are PascalCase not CamelCase! Jan 18, 2024
@shabnum99
Copy link

I think there is no strict restriction for class names to follow a specific naming convention. We can use any of the above mentioned, what's more important is to be consistent to enhance readability and maintainability.

@iHapiW
Copy link
Author

iHapiW commented Feb 3, 2024

Sure there is not restriction about naming stuff. But, this is the convention and it is preferred to be observed.

@shabnum99
Copy link

Got you. Thanks.

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