Is it necessary to begin new object in Java Script with a capital letter? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is it necessary to begin new object in Java Script with a capital letter?

19th Jul 2021, 2:49 PM
Daniel Nyagaka
Daniel Nyagaka - avatar
2 Answers
+ 1
Nope. Won't make a difference in terms of necessity and is really just up to what coding style you subscribe to. Personally, I use camelCase for most variables and such, and I use PascalCase for things like functions. So do whatever is pleasing to you, or do whatever is required by the team you're working so that the code is consistent and more easily maintainable when everyone using same system.
19th Jul 2021, 4:59 PM
Jakko Jak
Jakko Jak - avatar
+ 1
Thank you
21st Jul 2021, 10:42 AM
Daniel Nyagaka
Daniel Nyagaka - avatar