Tagged Questions
10
votes
6answers
773 views
Javascript naming conventions
I am from Java background and am new to JavaScript. I have noticed many JavaScript methods using single character parameter names, such as in the following example.
doSomething(a,b,c)
I don't like ...
7
votes
1answer
199 views
Why does XMLHttpRequest not seem to follow a naming convention?
I've been working with the XMLHttpRequest object in JavaScript recently, and I couldn't help but notice that the casing of this name makes no sense. Why is 'XML' all in caps while 'Http' is not? ...
6
votes
4answers
1k views
What is the name for a NON-self-calling function?
I have a collection of normal functions and self-calling functions within a javascript file. In my comments i want to say something along the lines of "This script can contain both self-calling and ...
4
votes
2answers
113 views
Capitalization of hierarchical constants
If constants are structured hierarchically, do the "folders" also need to be capitalized? Take for example a Javascript object that needs to store constants for a video player. Is the convention to ...
3
votes
6answers
703 views
“As” Naming Convention
I'm experimenting with a naming convention I've devised and am seeking opinion. It involves the use of an "As" infix, and at this point I am envisioning it in the context of JavaScript, C# and C++ ...
3
votes
2answers
641 views
How to name a private method in a language which doesn't support privacy?
What's the coding standard for naming a private method in a language which does not have the private modifier? Specifically, I am talking about Javascript. Below I've placed an underscore at the end ...
2
votes
1answer
315 views
How do you name “javascript:” prefix in inline event handlers?
In the following code:
<a onclick="javascript:alert()">
how do you name the javascript: part? Protocol, pseudo-protocol, scheme, label, prefix?
I am only trying to figure out a common name ...