Change:
The expected solution for step 91 is the following However, the directions don't mention using the method Since the directions mention then a camper could write this and then be surprised to learn that the method is expected. we should update instructions here to let campers know that there is an expected solution. Or update the tests to allow for multiple valid solutions. Open to hearing thoughts see explanation above see explanation above No response Device: [e.g. iPhone 6, Laptop] OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04] Browser: [e.g. Chrome, Safari] Version: [e.g. 22] No response
It would be interesting to see how campers can achieve the same result with both methods since they do the same job fairly, so I'm up for modifying the test to accept multiple valid solutions. As per the solutions it can accept, I looked up a few methods, and stuff like is now said to be 'legacy'... ? So if we do validate the option of modifying the tests, only and would be accepted?
We could use the event. That way it is only the value set on the element we care about. But I can't figure out how to do the assert inside a window load event (we have to wait for the DOM). I see the assert in the browser console but the test just passes anyway. I tried a few different things (try/catch, throwing, , promise delays and try/catch) but I can't get the test to fail properly. There is apparently something about how the tests run I don't understand.
Rather than that approach, we could mock the event. Or some such.
I think we should go with something like this
I am going to go ahead and open this up for contribution. So it looks like instead of updating the directions to expect one solution, we will just update the tests to accept multiple valid solutions. It looks like the conversation in this thread has focused on different approaches to update the tests but I think that we can leave that actual implementation up to the contributor.

Discussion:
You should call the `.slice()` method on the `value` argument. ```js <del> assert.match(code, /consts+updates*=s*(?s*events*)?s*=>s*{s*consts+elements*=s*event.target;?s*consts+values*=s*element.value.replace(s*/s/gs*,s*('|"|`)1s*);?s*ifs*(s*(!value.includes(s*element.ids*)s*&&s*(?:values*[s*0s*]s*===s*('|"|`)=3|value.charAt(0)s*===s*('|"|`)=4|value.startsWith(('|"|`)=5))|(?:values*[s*0s*]s*===s*('|"|`)=6|value.charAt(0)s*===s*('|"|`)=7|value.startsWith(('|"|`)=8))s*||s*!value.includes(s*element.ids*))s*)s*{s*element.values*=s*evalFormula(s*value.slice(/); </del> <ins> assert.match(code, /consts+updates*=s*(?s*events*)?s*=>s*{s*consts+elements*=s*event.target;?s*consts+values*=s*element.value.replace(s*/s/gs*,s*('|"|`)1s*);?s*ifs*(s*(!value.includes(s*element.ids*)s*&&s*(?:values*[s*0s*]s*===s*('|"|`)=3|value.charAt(0)s*===s*('|"|`)=4|value.startsWith(('|"|`)=5))|(?:values*[s*0s*]s*===s*('|"|`)=6|value.charAt(0)s*===s*('|"|`)=7|value.startsWith(('|"|`)=8))s*||s*!value.includes(s*element.ids*))s*)s*{s*element.values*=s*evalFormula(s*value.(?:slice|substring)(/); </ins> ``` You should pass the number `1` as the argument to your `.slice()` call. ```js <del> assert.match(code, /consts+updates*=s*(?s*events*)?s*=>s*{s*consts+elements*=s*event.target;?s*consts+values*=s*element.value.replace(s*/s/gs*,s*('|"|`)1s*);?s*ifs*(s*(!value.includes(s*element.ids*)s*&&s*(?:values*[s*0s*]s*===s*('|"|`)=3|value.charAt(0)s*===s*('|"|`)=4|value.startsWith(('|"|`)=5))|(?:values*[s*0s*]s*===s*('|"|`)=6|value.charAt(0)s*===s*('|"|`)=7|value.startsWith(('|"|`)=8))s*||s*!value.includes(s*element.ids*))s*)s*{s*element.values*=s*evalFormula(s*value.slice(s*1s*)s*);?/); </del> <ins> assert.match(code, /consts+updates*=s*(?s*events*)?s*=>s*{s*consts+elements*=s*event.target;?s*consts+values*=s*element.value.replace(s*/s/gs*,s*('|"|`)1s*);?s*ifs*(s*(!value.includes(s*element.ids*)s*&&s*(?:values*[s*0s*]s*===s*('|"|`)=3|value.charAt(0)s*===s*('|"|`)=4|value.startsWith(('|"|`)=5))|(?:values*[s*0s*]s*===s*('|"|`)=6|value.charAt(0)s*===s*('|"|`)=7|value.startsWith(('|"|`)=8))s*||s*!value.includes(s*element.ids*))s*)s*{s*element.values*=s*evalFormula(s*value.(?:slice|substring)(s*1s*)s*);?/); </ins> ``` # --seed--