mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-25 02:14:11 -05:00
fix(curriculum): allow for strict and regular inequality operator step 47 (#53606)
Co-authored-by: Joy Shaheb <khondokoralam@gmail.com>
This commit is contained in:
@@ -16,19 +16,26 @@ Inside the `closeTaskFormBtn` event listener, use `const` to create another vari
|
||||
Your `formInputValuesUpdated` variable should check if `titleInput.value` is not equal to `currentTask.title`.
|
||||
|
||||
```js
|
||||
assert.match(code, /const\s+formInputValuesUpdated\s*=\s*titleInput\.value\s*!==\s*currentTask\.title\s*/)
|
||||
const regex = /const\s+formInputValuesUpdated\s*=(?=.*titleInput\.value\s*(!==|!=)\s*currentTask\.title)/
|
||||
|
||||
assert.match(code, regex)
|
||||
```
|
||||
|
||||
Your `formInputValuesUpdated` variable should check if `titleInput.value` is not equal to `currentTask.title` or `dateInput.value` is not equal to `currentTask.date`.
|
||||
|
||||
```js
|
||||
assert.match(code, /const\s+formInputValuesUpdated\s*=\s*titleInput\.value\s*!==\s*currentTask\.title\s*\|\|\s*dateInput\.value\s*!==\s*currentTask\.date/)
|
||||
const regex = /const\s+formInputValuesUpdated\s*=(?=.*titleInput\.value\s*(!==|!=)\s*currentTask\.title)(?=.*dateInput\.value\s*(?:!==|!=)\s*currentTask\.date)/
|
||||
|
||||
assert.match(code, regex);
|
||||
|
||||
```
|
||||
|
||||
Your `formInputValuesUpdated` variable should have the value `titleInput.value !== currentTask.title || dateInput.value !== currentTask.date || descriptionInput.value !== currentTask.description`.
|
||||
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`.
|
||||
|
||||
```js
|
||||
assert.match(code, /const\s+formInputValuesUpdated\s*=\s*titleInput\.value\s*!==\s*currentTask\.title\s*\|\|\s*dateInput\.value\s*!==\s*currentTask\.date\s*\|\|\s*descriptionInput\.value\s*!==\s*currentTask\.description\s*;?/)
|
||||
const regex = /const\s+formInputValuesUpdated\s*=\s*titleInput\.value\s*!==\s*currentTask\.title\s*\|\|\s*dateInput\.value\s*!==\s*currentTask\.date\s*\|\|\s*descriptionInput\.value\s*!==\s*currentTask\.description\s*;?/
|
||||
|
||||
assert.match(code, regex);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user