by BugZeroCodes | May 30, 2021 | Blog
Today I completed the “Quarter of the year” kata on Codewars!
Looking at the code, it was easy to see what to do: if the month(a number) was at least equal to 1 but smaller than 13, output a number from 1-12. Knowing this, I typed the code and it worked
by BugZeroCodes | May 26, 2021 | Blog
Today I completed the “How many lightsabers do you own?” kata on Codewars!
It didn’t take long to see what to do: if a given name is equal to ‘Zach’, return 18; otherwise, return 0. Knowing this, I wrote the code and it worked!
And don’t forget: don’t hog all the lightsabers!
by BugZeroCodes | May 24, 2021 | Blog
Today I completed the “Returning Strings” kata on Codewars!
Looking at the code, I could easily see what to do: write a return statement that returns a string in this format: “Hello, <name> how are you doing today?” Knowing this, I wrote the statement and it worked
by BugZeroCodes | May 18, 2021 | Blog
Today I completed the “Will you make it?” kata on Codewars!
The code called for a function that took the miles away from a gas pump, a car’s miles/gal, and how many gallons of fuel are left. Based on this data, it should return true if the car would make it to the pump and false if otherwise. So I went into the code, wrote the function, and it worked!
by BugZeroCodes | May 12, 2021 | Blog
Today I completed the “The highest profit wins!” kata on Codewars!
I had to make an array that returns the largest and smallest numbers from a provided array. Not knowing how to do this, I looked up suggestions and found Math.min.apply and Math.max.apply. Using these two, I wrote a simple return statement and it worked!
When you don’t know how to do something, look up a guide to help you!
Recent Comments