This is a difficult Codewars problem.
There are two ways that most people solved it. They are hidden in the hints below.
Hint
- JavaScript proxies
defineProperty
There’s a discussion about the solutions in the private area here (log-in required). Give the problem a try first.