Kata of the Day #1

What is between?

kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
kata
Kata of the Day #1

Complete the function that takes two integers (a, b, where a < b) and return an array of all integers between the input parameters, including them.

TypeScript


export class Kata {
  static highAndLow(numbers: string): string {
    let arr: number[] = numbers.split(" ").map(Number);
    let max: number = Math.max(...arr);
    let min: number = Math.min(...arr);
    return `${max} ${min}`;
  }
}

Go


package kata

func Between(a, b int) []int {
  var arr []int
  
	for i := a; i <= b; i++ {
		arr = append(arr, a)
		a++
	}

  return arr
}

Go to Kata
ByCesar Kohl

Need a budget?

Let's talk
budget
budget
budget
budget
budget
budget
budget
budget
budget
budget