Codewars Total amount of points – Easy Solution Javascript (8 kyu)

This is the solution for the Codewars Total amount of points question in Javascript with a simple & easy to understand code and explanation. Task: Our football team finished the championship. The result of each match looks like “x:y”. Results of all matches are recorded in the collection. For example: [“3:1”, “2:2”, “0:1”, …] Write … Read more

Codewars Closest elevator – Easy Solution Javascript (8 kyu)

This is the solution for the Codewars Closest elevator question in Javascript with a simple & easy to understand code and explanation. Task: Given 2 elevators (named “left” and “right”) in a building with 3 floors (numbered 0 to 2), write a function elevator accepting 3 arguments (in order): left – The current floor of … Read more

Codewars A wolf in sheep’s clothing – Easy Solution Javascript (8 kyu)

This is the solution for the Codewars A wolf in sheep’s clothing question in Javascript with a simple & easy to understand code and explanation. Task: Wolves have been reintroduced to Great Britain. You are a sheep farmer, and are now plagued by wolves which pretend to be sheep. Fortunately, you are good at spotting … Read more

Codewars Powers of 2 Simple & Easy Solution Javascript (8 kyu)

This is the solution for the Codewars Powers of 2 question in Javascript with a simple & easy to understand code and explanation. Task: Complete the function that takes a non-negative integer n as input, and returns a list of all the powers of 2 with the exponent ranging from 0 to n (inclusive). Here’s … Read more

Codewars Points of Reflection Solution Javascript / C / C++ (8 kyu)

This is the solution for the Codewars Points of Reflection question in Javascript or C or C++ with a simple & easy to understand code and explanation. The logic will be the same in all the languages. Task: Given two points P and Q, output the symmetric point of point P about Q. Each argument … Read more