Got on codewars js challenge