0
Which one do you prefer between JS and C#,when it comes to naming of variables?
Variables naming
3 Antworten
+ 3
Can you explain, why you're asking this?
I just don't get it. Why does this even matter?
In my opinion, you can name stuff comfortably in every language: From C to Python, you have enough liberties.
Then there are conventions, like when to start them upper or lower, camel, pascal, snake case or whatever. All caps for constants. leading or trailing _ for special purposes. Hungarian notation, if you like.
These things span across the spectrum of languages, don't they?
So again: What is this even about? Are you asking us about a matter of taste?
+ 1
Reason is that, JavaScript is untyped language. This means that a JavaScript variable can hold a value of any data type. Unlike many other languages, you don't have to tell JavaScript during variable declaration what type of value the variable will hold. The value type of a variable can change during the execution of a program and JavaScript takes care of it automatically.
0
But what does that have to do with naming?