News for hackers. Stuff that matters.
Re:Code snippets on Microsoft website shown in form of images. by ward on Wednesday December 07, 2011 @11:17AM (#3324391)
I don't see a bunch of variable definitions on one line as an improvement, just reads less easily and only feels justified in the case of some low numbers like

    var x = 0, y = 1, z = 0;
    // Some looping or similar here
I do agree with your using of `english` variable to assign `currentLanguage`.
Re:Code snippets on Microsoft website shown in form of images. by WesleyJohnson on Wednesday December 07, 2011 @01:09PM (#3324986)
Personally, I like doing all the declarations on their own line as well. But anytime I've used JSLint in the past, I seem to recall it complaining about that. Perhaps I'm mistaken?
Re:Code snippets on Microsoft website shown in form of images. by masklinn on Wednesday December 07, 2011 @01:14PM (#3325020)
I expect JSLint was whining about using multiple `var` statements.

Using a single var and putting each declaration on its line is not incompatible:

    var foo = 4,
        bar = 5,
        baz = 6,
        qux = 'quux;
Re:Code snippets on Microsoft website shown in form of images. by ward on Wednesday December 07, 2011 @01:36PM (#3325130)
That feels like a situation that could easily end up (copy pasting something, someone adding another var, ...) in an unexpected global variable declaration.

    var foo = 4,
        bar = 5,
        baz = 6,
        sprinkles = 'wee';
        qux = 'quux';
Making `qux` global.