Could you explain to me (s.length / 2 - 1) ? To me it is saying find the middle and move the index down one in case it is an even number string length so you can return both numbers. I don't get it, I do understand the deprication of substr and I used substring in my solution. Or if you could maybe explain what the (s.lenght / 2) - 1 means that will help as well.
Do keep in mind when you are coding you are coding for people who come after you as well. So make it easy on them, this is far too complicated of a solution for anyone to come after you and alter it. <3
Could you explain to me (s.length / 2 - 1) ? To me it is saying find the middle and move the index down one in case it is an even number string length so you can return both numbers. I don't get it, I do understand the deprication of substr and I used substring in my solution. Or if you could maybe explain what the (s.lenght / 2) - 1 means that will help as well.
This comment is hidden because it contains spoiler information about the solution
Do keep in mind when you are coding you are coding for people who come after you as well. So make it easy on them, this is far too complicated of a solution for anyone to come after you and alter it. <3
I had the same answer except my output was throwing an error at my < sign... why?