Change:
We are not assigning the function call to anything. Not 100% sure what the expected error in the code is that we are testing for here. It might be its position. Also, if you forget to use the property on the you are passing to you will get this assert message, which is confusing. I don't think this test should care about the argument to , only the function call position (if that is what we are testing for here). tests: As an aside. We have all the elements and event listeners ready to be used, can't the test use them for at least the last three tests? Give the correct assert messages. 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
We could use this wording for the hint text I believe so. It looks we are testing for and then the next few tests are for the ternary I feel like we still need to check for the actual user message here because if the camper does something like this then they might be missing the point of the challenge. So I think we should update the tests to better check for that. But also, I think the description could be updated to better explain why they need to make these changes. Something like this could work Maybe? It would be nice to cut down on the regex here
"the result of the function call" makes it sound like the element will be assigned the function return value. We are not assigning the result of the function call. We are assigning the expression the ternary condition evaluates to based on what returns. For test 2, if we only care about the position of the function then: Because the regex includes the argument it will cause a false positive where the position can be correct but if you do not use the correct argument you get this assert message. The assert message should be about the function position without making it sound like its return value is being assigned to the element. We check the argument in test 3 and the hint shows the function call with the expected argument.

Discussion:
Back in your event listener, you need to update the text of the `result` element. <del> Use a ternary operator to update the text of the `result` element after the `if` statement. Check the truthiness of calling `isSpam()` on the value of the `messageInput` element. If true, set the text to `Oh no! This looks like a spam message.`. Otherwise, set the text to `This message does not seem to contain any spam.` </del> <ins> After the `if` statement, use a ternary operator to check the truthiness of calling `isSpam()` with `messageInput.value` as the argument. If true, set the `textContent` property on the `result` element to `Oh no! This looks like a spam message.`. Otherwise, set it to `This message does not seem to contain any spam.` </ins> <del> Then set the `messageInput` element's value to an empty string. </del> <ins> Then set the `messageInput` element's `value` property to an empty string. </ins> # --hints--

assert.match(code, /checkMessageButton.addEventListener(s*('|"|`)click1s*,s*(s*)s*=>s*{s*ifs*(s*messageInput.values*===s*('|"|`)2s*)s*{s*alert(s*('|"|`)Please enter a message.3s*);?s*returns*;?s*}s*result.textContents*=s*/) ``` <del> You should assign the `isSpam()` function call to `result.textContent`. </del> <ins> You should call the `isSpam()` function after the assignment operator `=` and before the `?` ternary operator. </ins> ```js <del> assert.match(code, /checkMessageButton.addEventListener(s*('|"|`)click1s*,s*(s*)s*=>s*{s*ifs*(s*messageInput.values*===s*('|"|`)2s*)s*{s*alert(s*('|"|`)Please enter a message.3s*);?s*returns*;?s*}s*result.textContents*=s*isSpam(s*messageInput.values*)/) </del> <ins> assert.match(code, /checkMessageButton.addEventListener(s*('|"|`)click1s*,s*(s*)s*=>s*{s*ifs*(s*messageInput.values*===s*('|"|`)2s*)s*{s*alert(s*('|"|`)Please enter a message.3s*);?s*returns*;?s*}s*result.textContents*=s*isSpam(.*)s*?/) </ins> ``` You should use ternary syntax to check the truthiness of `isSpam(messageInput.value)`.

assert.match(code, /checkMessageButton.addEventListener(s*('|"|`)click1s*,s*(s*)s*=>s*{s*ifs*(s*messageInput.values*===s*('|"|`)2s*)s*{s*alert(s*('|"|`)Please enter a message.3s*);?s*returns*;?s*}s*result.textContents*=s*isSpam(s*messageInput.values*)s*?s*('|"|`)Oh no! This looks like a spam message.4s*:s*('|"|`)This message does not seem to contain any spam.5;?s*/); ``` <del> After your ternary, set the `value` of `messageInput` to an empty string. </del> <ins> After your ternary, set the `value` property on the `messageInput` element to an empty string. </ins> ```js <del> assert.match(code, /checkMessageButton.addEventListener(s*('|"|`)click1s*,s*(s*)s*=>s*{s*ifs*(s*messageInput.values*===s*('|"|`)2s*)s*{s*alert(s*('|"|`)Please enter a message.3s*);?s*returns*;?s*}s*result.textContents*=s*isSpam(s*messageInput.values*)s*?s*('|"|`)Oh no! This looks like a spam message.4s*:s*('|"|`)This message does not seem to contain any spam.5;?s*messageInput.values*=s*('|"|`)6;?s*}/) </del> <ins> assert.match(code, /checkMessageButton.addEventListener(s*('|"|`)click1s*,s*(s*)s*=>s*{s*ifs*(s*messageInput.values*===s*('|"|`)2s*)s*{s*alert(s*('|"|`)Please enter a message.3s*);?s*returns*;?s*}s*result.textContents*=s*isSpam(s*messageInput.values*)s*?s*('|"|`)Oh no! This looks like a spam message.4s*:s*('|"|`)This message does not seem to contain any spam.5s*;?s*messageInput.values*=s*('|"|`)6;?s*}/) </ins> ``` # --seed--