What is the javascript convention for libraries / classes when the name starts with a number?

In javascript, a variable name cannot start with a number. However, we are working under a name that starts with a number, such as 1world. In C ++ or C #, I would prefix C for the class or N for the namespace: C1world or N1world.

Is there a convention in javascript to handle this?

+3


source to share


1 answer


All named objects in JavaScript must begin with a letter. In cases where I wanted to start with a number, I just camelCase it (i.e. OneMethod or OneConstructor).



http://www.w3schools.com/js/js_conventions.asp

0


source







All Articles