Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Сalculate how many years ago the father was twice as old as his son.
(or in how many years he will be twice as old).
While he has not been 60 yet, he will be in 5 years.
Father 50, son 25, 5 years ago.
Please read this: https://docs.codewars.com/training/troubleshooting/ and mark your post as having spoiler content next time. Print the input, see why your code fails with that.
Because strings are immutable. There is no method on a string object that modifies it in place. The method you call here just creates a new string, which is stored nowhere. Then you return the original string unmodified.