1. first, use !==, second, why not return null if you couldn't find the value?
Ok. Let me try
parseint((left + right) / 2) has done the work but there is still one issue
just use Math.floor, you don't need to turn it to a string and then parse it again
This is wrong
Обсуждают сегодня