There's a piece of land with N number of boxes and a rabbit. You're playing a guessing game with the rabbit, you have to guess in which box the rabbit is but before every guess the rabbit is going to jump either to the box on the left or the one on the right.
The function below implements the rabbit logic and allow you to perform guesses. You must write a function capable of finding the rabbit every time.
const startRabbitGame = (fieldLength) => {
let rabbitPosition = Math.floor(Math.random() * fieldLength)