####Leap - first exercise
My code here
-
Responder #1 (here) - This is really similar to mine - our order is a bit different.
-
Responder #2 (here) - Another single line, which i like, but he used === instead of == like i did. I made the choice to use == since I wasn't concerned with type - just value.
-
Responder #3 (here) - This one is broken out a bit more - it sort of looks like my first iteration (before I submitted). I think this is readable for sure.
-
Responder #4 (here) - This submission is fairly complicated and not super readable, to me at least. I see that this person created variables to use in the returns, but I am not entirely sure why. This doesn't feel efficient but it is hard for me to know since I am brand new to this haha.
-
Responder #5 (here) - A very readbale solution, though I tend to take my comments out of my code once I am done with them. This looks similar to my first pass as well before I refactored to combine. It makes a ton of sense, and is super clean.
####Bob My code here ( I GOT A LIKE! )
I did this one because it said it was based on Deaf Grandma and that one was a TON of fun in Ruby. I had to google a lot on the empty space one.
-
Responder #1 here - Simlar to me, she kept her code in the if/else if/else format with no external functions. She uses a lot of regex too. That format is becoming more familiar to me, but i still have to look it up everytime.
-
Responder #2 here - i like that this one uses the .trim method on the input - i read about that in my JavaScript & jQuery book, but wasn't getting it to function the way I wanted it to. I am going to keep trying this one though, because i like this WAY better than the rege which feels sort of hacky to me.
-
Responder #3 here - I have seen a few responses with using
let
but have not tried it. i think this is a newer version of JS maybe? Could be version 6, bit quite sure. I read about it in a chapter yesterday. Feels likelet
is like a setup for the function: "let it be this until it is not." -
Responder #4 here - This solution reminds me more of mine. I really like the 2nd else if statement that uses .trim and .length to handle the empty string.
-
Responder #5 here - This solution is one of the more complicated that I read through. He uses case statements to go through the logic - seems a bit heavy, but I am not sure. I found this one challenging to read through but also extremely intriguing.
####Phone-Number My code here
-
Responder #1 [here] (http://exercism.io/submissions/7e1e7aac559a420daeb59285f4a26fbb) - this one looks really calen. i like they he/she used a swtich statement as i have not tried that yet at all. I think it is really cool use the case statments on the length - quick and easy and clean for sure. i don't understand the .subscrober method in this one, but based on the code it is the last 4 digits of the number. This person understands phone numbers, that is for sure.
-
Responder #2 [here] (http://exercism.io/submissions/bf3819087cd743eeba4c7326c46a6d9d) - another super clean response. I really like how this is broken out. i think i will work on refactoring mine to have the clean digit be in the main fucntion. this one uses a Class which is new to me in JS as well.
-
Responder #3 [here] (http://exercism.io/submissions/d139e40298144c61b36af858b8f66feb) - this developer also uses a class - looks VERY Ruby-ish which is actually pretty cool to me. i think i need to look into JS classes a bit more and see if this will help me write some cleaner code.
-
Responder #4 [here] (http://exercism.io/submissions/33f76b7802bc42bf8a4bba9b4fce3653) - this one does not uses classes and looks a bit more like soemthing I would be writing. I like how this has no repetition (unlike mine) and reads really easily.
-
Responder #5 [here] (http://exercism.io/submissions/9ebba5c66d684b9bbe889ba48fc3f6c9) - i really like that he declares the cleaning function at the top and just uses that throughout. i may try something like that in my refactor.