My code here
-
Responder #1 (here) - This responder took largely the same approach as me but used the
charAt()
JS function rather than splitting up the strings into arrays like I did. In this case, I feel like I should have used this built-in JS method rather than taking an extra step and creating two arrays and checking each character at their respective indices. -
Responder #2 (here) - This responder used the
forEach()
method rather than using afor
loop like I did. I'd like to know which is a more efficient method; otherwise, we handled the problem the same way. -
Responder #3 (here) - The approaches this responder and I used vary a bit more this time--he broke out a lot of his methods into functions, which seems a bit more organized than mine, but it takes up more lines of code that seem unnecessary. He also made his own
error
function, which is a cool work arround theError
function JS has. -
Responder #4 (here) - This responder's approach is also almost exactly identical to mine--I'm just not sure what the difference is between using
throw new Error()
orthrow Error()
is. Thenew
didn't seem necessary to pass my test, but is there another reason it needs to be there? -
Responder #5 (here) - Again, this responder's result is similar to responder #1's, but this time they saved the string lengths into variables to check that they were the same length.
My code here
-
Responder #1 (here) - This responder pretty much mirrored how I handled this exercism with the execption of how we started off with the lyrics to the song.
-
Responder #2 (here) - I really like the
switch();
function this responder used in order to handle theverse();
fucntion. I'll definitely try to utilize this in the future. -
Responder #3 (here) - This responder really broke out the different portions of the song--it seems super organized. I like how they also used
for
loops for iterating through the song. -
Responder #4 (here) - I think it's interesting how you can kind of tell that this responder only worried about making the spec pass for the first few tests and then handled retrieving the middle lyrics later in the program.
-
Responder #5 (here) - I think it's really interesting how this responder organized the verses by the type of "food" the old lady would eat. I definitely feel like I should have broken up the lyrics into a JS object for this exercise.
My code here
-
Responder #1 (here) - This responder used an approach that is similar to mine. I'm thinking now that I didn't need to use
this.left
orthis.right
when creating my Bst JS object. -
Responder #2 (here) - I'm not really sure how lines 23-31 are working, but before that, this responder's program totally follows the same suit as mine.
-
Responder #3 (here) - I'm a pretty big fan of how this responder chose to handle their
each();
method. And I like how they broke out aninsertOrMake();
method to use within theirinsert();
method. -
Responder #4 (here) - I'm interested to know why this responder chose to turn the JS object they were building into an array, but otherwise it seems well broken out compared to mine.
-
Responder #5 (here) - This one pretty much mirrors my approach to this program.