+ 15

Choose the names that are acceptable for JavaScript variables.

Easy answer

17th May 2018, 11:07 PM
Tanha
Tanha - avatar
6 Antworten
+ 22
Mikel Sánchez, Thank you so much for your guide line and help
18th May 2018, 1:56 AM
Tanha
Tanha - avatar
+ 14
I hope you aren't testing our knowledge or something. It's explained right in the js lesson. " Naming rules: - The first character must be a letter, an underscore (_), or a dollar sign ($). Subsequent characters may be letters, digits, underscores, or dollar signs. - Numbers are not allowed as the first character. - Variable names cannot include a mathematical or logical operator in the name. For instance, 2*something or this+that; - JavaScript names must not contain spaces. " https://www.sololearn.com/learn/JavaScript/1128/ For an extended information check this stack over question. it can help. https://stackoverflow.com/questions/1661197/what-characters-are-valid-for-javascript-variable-names
18th May 2018, 1:58 AM
Lord Krishna
Lord Krishna - avatar
+ 9
Most conventions require that camelCase be used to name variables. Even so, there are many people who use other alternate or personal conventions. If they are not using a linter there are also people who are not aware of the appointment of elements and other aspects of the language. I'll cover some guides on this, maybe can be useful: https://github.com/airbnb/javascript https://google.github.io/styleguide/jsguide.html https://www.w3schools.com/js/js_conventions.asp
18th May 2018, 12:58 AM
Mickel
Mickel - avatar
+ 1
Answear is _module and firstNumber
12th May 2020, 11:51 AM
Mizanur Rahman Sajid
Mizanur Rahman Sajid - avatar
0
is _module firstNumber
20th Apr 2020, 5:36 PM
Suku Gurung
Suku Gurung - avatar
0
_module firstNumber
2nd Dec 2021, 3:17 PM
Md. Rakibul Islam
Md. Rakibul Islam - avatar