Tell us what’s happening: help me guyssssssss T_T
Your code so far
const formInputValuesUpdated = titleInput.value != currentTask.title || dateInput.value != currentTask.date || descriptionInput.value != currentTask.description;
WARNING
The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.
You will need to take an additional step here so the code you wrote presents in an easy to read format.
Please copy/paste all the editor code showing in the challenge from where you just linked.
Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Challenge Information:
Learn localStorage by Building a Todo App - Step 47
1 Like
Teller
February 7, 2024, 12:36pm
2
Welcome to the forum @vaasumarothia45
If the inequality operator does not work, have you tried the strict inequality operator?
Happy coding
2 Likes
it looks like the last hint provides the answer using the strict inequality operator.
But the tests should allow for both operators.
I created an issue for that here
opened 01:56PM - 07 Feb 24 UTC
type: bug
help wanted
scope: curriculum
new javascript course
### Describe the Issue
We had a camper on the forum try to pass step 47 with … this code.
https://forum.freecodecamp.org/t/learn-localstorage-by-building-a-todo-app-step-47/670549
```js
const formInputValuesUpdated = titleInput.value != currentTask.title || dateInput.value != currentTask.date || descriptionInput.value != currentTask.description;
```
The description do not specify that the answer has to use the strict inequality. Only the last hint does.
```js
const formInputValuesUpdated = titleInput.value !== currentTask.title || dateInput.value !== currentTask.date || descriptionInput.value !== currentTask.description;
```
the tests should be updated to allow for both
Also the tests expect a certain order.
The tests shouldn't force a particular order.
All valid answers should be accepted.
Update this last hint text here
```js
Your `formInputValuesUpdated` variable should have the value `titleInput.value !== currentTask.title || dateInput.value !== currentTask.date || descriptionInput.value !== currentTask.description`.
```
It should be updated to this so we don't force order or preference over inequality operators.
```md
Your `formInputValuesUpdated` variable should check if `titleInput.value` is not equal to `currentTask.title`, `dateInput.value` is not equal to `currentTask.date`, or `descriptionInput.value` is not equal to `currentTask.description`.
```
And if there is a way to rewrite the tests to use less regex and more of the other assert methods, that would be even better
https://www.chaijs.com/api/assert/#method_assert
### Affected Page
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-localstorage-by-building-a-todo-app/step-47
### Your code
see example above
### Expected behavior
see example above
### Screenshots
_No response_
### System
- 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]
### Additional context
_No response_
3 Likes
system
Closed
August 10, 2024, 11:29pm
5
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.