Skip to main content
Code Review

Return to Revisions

3 of 3
replaced http://stackoverflow.com/ with https://stackoverflow.com/

I am going to mostly focus on style here.

  1. You need to indent your code. According to JSLint, JavaScript should use 4-space indentation.

  2. You need to use braces around all your ifs, fors, &c. According to JSLint, you should style your braces like this:

     function myFunction() {
     if (condition) {
     // Do something...
     }
     while (condition) {
     // Do something...
     }
     }
    
  3. As demonstrated in the example above, you should also use a space after your closing parenthesis ) and your opening brace {.

  4. The man who wrote JSLint has a list of good styles, which seems to be widely used by the JavaScript community.

user34073
default

AltStyle によって変換されたページ (->オリジナル) /