Skip to content

Instantly share code, notes, and snippets.

@notmarkmiranda
Created June 25, 2016 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notmarkmiranda/467c3b6b7a2926f8899ab89994023911 to your computer and use it in GitHub Desktop.
Save notmarkmiranda/467c3b6b7a2926f8899ab89994023911 to your computer and use it in GitHub Desktop.

##Leap My code: here

  • Responder #1 (here) - This person used a single line return statement. I like how clean it is.

  • Responder #2 (here) - This person used a single if/else block.

  • Responder #3 (here) - This person used 3 different if blocks. I dont think the code reads well because none of the blocks close an is based on the idea that returns break code.

  • Responder #4 (here) - This person uses a nest if statement. It looks clean and I feel like I dont know enough about JS to refute that method.

  • Responder #5 (here) - This is similar to the first responder. Single-line, very clean.

##Hamming My code: here

  • Responder #1 (here) - The only difference from this one and mine is that they used a counter++ to increment the counter, where I used difference += 1

  • Responder #2 (here) - This is the same as mine. Syntax is less readable due to single-line if statements.

  • Responder #3 (here) - This is the same as mine. Syntax is a tiny bit different, but similar.

  • Responder #4 (here) - This is the same as mine except a single-line if on line 10.

  • Responder #5 (here) - This is the same as mine. Most of these examples are super similar. I guess there isn't a variation of ways to do this one.

##RNA Transcription My code: here

  • Responder #1 (here) - This is the same as mine except he used single-line if statements.

  • Responder #2 (here) - This person defined a dictionary that had an alternate choice for any letter submitted.

  • Responder #3 (here) - This person pushed to an array and joined at the end.

  • Responder #4 (here) - Similar to responder 2, they defined a dictionary with a complementary letter.

  • Responder #5 (here) - This person used a case statement. It's an interesting implementation, although I don't think I would've ever made the leap to a case statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment