I've been using Javascript for quite a while, but I've always ignored the common naming conventions that I see online (camelCase). I know it all depends on the developer's preference, but why camel case for Javascript?
I'm originally a PHP programmer and I kind of have my own naming convention and I use it everywhere I can, including Javascript. Well, I have to sacrifice my naming convention when it comes to Java though as the program flow depends on those names sometimes.
Anyway, my convention goes like:
var variable_name = 'I always use underscores to separate words';
var another_variable = 'I also tend to use single quotes all the time';
function epic_name_here (some_paramaters ...)
{
// Curly brackets on separate lines
do_something();
}
if (x == y)
{
// Same goes here
}
I have taken this kind of code-writing style from working a lot with phpBB, their docs encourage people to use this style.
Why do I see a lot of people writing Javascript in camelCase? And will it be a problem if I don't use it?