Hot answers tagged

30 votes
Accepted

Who's in the fellowship? When are Frodo, and the rest of the gang, together

Loading This is unconventional: var fizzLoaded; function fizzLoad() { if (fizzLoaded) { return; } fizzLoaded = true; … } There isn't any harm in ...
15 votes

Who's in the fellowship? When are Frodo, and the rest of the gang, together

Names I find that in your naming, while it appears consistent, the constant use of the fizz prefix is a bit odd, since when you run it you use other words than ...
  • 20.3k
15 votes
Accepted

Fibonacci checker

About this code: function TestFibo() { InputNum = document.getElementById("InputNum").value; The convention for function names is ...
  • 110k
14 votes

Cardshifter game lobby

Well, there's lots of code needing review. I've done my best to split it into each language. I've avoided reviewing Angular, since it's a library I'm not comfortable with. HTML: You have tons and ...
14 votes

Cardshifter game lobby

Tables for layout This is a clear and obvious misuse of the table element. Tables are for representing tabular data and that's it. Would that same content make sense in a spreadsheet? If the ...
  • 3,624
13 votes

Who's in the fellowship? When are Frodo, and the rest of the gang, together

The idiomatic modern JavaScript way to write a loop over elements of an array is forEach. The for...in idiom is designed for ...
  • 110k
13 votes

Cardshifter game lobby

There's not much to cover, other than the things @IsmaelMiguel went over, nonetheless: The Mundane: This is less of a important thing, as a style thing, but: ...
  • 11.9k
13 votes
Accepted

Cardshifter game lobby

Background: I work as a web developer at a company. I'm the only Angular guy here, and we are using Angular in our greenfield CRM project, so my answer will mainly address Angular (as no one else has ...
  • 3,753
11 votes

"Star Catcher" game

Your code is good, but you have one massive oversight: It's hackable. Your code shouldn't be accessable from the Console. I would recommend using getters and setters to limit incorrect addition: <...
  • 11.9k
11 votes

Semantic markup for card blocks

200_success' comment is right, that the context and the content of the component is important for semantics. I assume, from the linked page, that you want to display a list of short articles that lead ...
10 votes
Accepted

Non-generalized Site Generator

Let's start on a few of the things you explicitly asked questions on before moving over to the code itself. Are my comments good? I'm coming from Java, and tried to use a Javadoc-like notation, but ...
  • 3,753
9 votes

Who's in the fellowship? When are Frodo, and the rest of the gang, together

...
  • 28.5k
9 votes

Who's in the fellowship? When are Frodo, and the rest of the gang, together

Inline-block, float and clear?! Most display properties are ignored when you float an element (inline-block, table-cell, etc.). Either float it or change it to inline-block, not both. However, what ...
  • 3,624
9 votes

Cardshifter game lobby

You should use strict mode in your JS scripts. It will allow you to avoid a lot of common mistakes. See the section "Changes in strict mode" in the MDN article I linked. Some of the advantages of ...
9 votes
Accepted

Karma Sutra game

Adding feedback in the form of hints like Select the first position, then Now select the second position would enhance UX. Now ...
  • 1,952
7 votes
Accepted

Simple CSS Parser

I'll mostly judge the actual parsing part, and not that much the boilerplate stuff around it Why explode the file twice? $element should be called ...
  • 620
7 votes

Non-generalized Site Generator

This is normal behavior, especially to newcomers to the web - the "do everything in JavaScript after you discover its power". ANYTHING else. I'm just learning JS now, so any advice about style/...
  • 24.8k
7 votes

HTML 5 form validation and form handling

Validating HTML5 Code It seems that you are new to HTML5, so it's a good idea to validate your code. You have 14 errors and 5 warnings in your code: autofocus="on"...
  • 24.9k
7 votes
Accepted

Create a dynamic growing pyramid

A few thoughts on the task and your solution: Limited to 5 elements You're limiting the pyramid to 5 elements. The task doesn't have a restriction like that. I see two possibilities here: Do not ...
7 votes
Accepted

Simple HTML website with JavaScript navbar

General disclaimer: You may notice that in one section I recommend not using something in this case, while in the next paragraph I show how you can improve the part I recommended not to use. I mainly ...
  • 2,597
6 votes

Cordova file management

Interesting question, it is of course not good to fill up memory with copies of pictures. Especially with this scandal in recent memory where deleted pictures haunt users. It seems from reading your ...
  • 32.8k
6 votes
Accepted

Fictional Hotel Website

What if you have 167 hotels? Would you copy/paste the code for all those hotels? I don't think you would. Start with making the script more general, so you have only to feed the data into the function....
  • 246
6 votes

First HTML5 game: Snake

You did really well with readability and documentation. On the design side, I would personally have the score off to the side and not in the middle, although it isn't that big of a deal. I would also ...
6 votes
Accepted

Simon says HTML5

First, bravo! It's very fun and highly nostalgic. I may or may not have forced encouraged my children to play it well past their bedtime. As to the structure, in 2014, it is absolutely recommended ...
  • 820
6 votes

Fibonacci checker

you should always use Brackets especially when you have an if/else situation ...
  • 28.5k
6 votes

Fibonacci checker

Your JavaScript code indentation is not according to convention. This: ...
  • 20.3k

Only top scored, non community-wiki answers of a minimum length are eligible