mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-14 10:01:58 -04:00
fix(curriculum): inconsistent show rules captialization (#55617)
This commit is contained in:
@@ -9,7 +9,7 @@ dashedName: step-2
|
||||
|
||||
When the user clicks on the `Show rules` button, the rules for the game should display on the screen. When they click on the button again, the rules should be hidden.
|
||||
|
||||
Use an event listener to invert the value of the `isModalShowing` variable, toggle the visibility of the `rulesContainer`, and change the text of the `rulesBtn` to `Show Rules` or `Hide Rules`.
|
||||
Use an event listener to invert the value of the `isModalShowing` variable, toggle the visibility of the `rulesContainer`, and change the text of the `rulesBtn` to `Show rules` or `Hide rules`.
|
||||
|
||||
# --hints--
|
||||
|
||||
@@ -32,10 +32,10 @@ When your `rulesBtn` is clicked, your `rulesContainer` should be visible.
|
||||
assert.isTrue(rulesContainer.checkVisibility());
|
||||
```
|
||||
|
||||
When your `rulesBtn` is clicked, your `rulesBtn` should say `Hide Rules`.
|
||||
When your `rulesBtn` is clicked, your `rulesBtn` should say `Hide rules`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(rulesBtn.innerText.trim(), "Hide Rules");
|
||||
assert.strictEqual(rulesBtn.innerText.trim(), "Hide rules");
|
||||
```
|
||||
|
||||
When your `rulesBtn` is clicked again, your `isModalShowing` should be `false`.
|
||||
@@ -51,10 +51,10 @@ When your `rulesBtn` is clicked again, your `rulesContainer` should not be visib
|
||||
assert.isFalse(rulesContainer.checkVisibility());
|
||||
```
|
||||
|
||||
When your `rulesBtn` is clicked again, your `rulesBtn` should say `Show Rules`.
|
||||
When your `rulesBtn` is clicked again, your `rulesBtn` should say `Show rules`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(rulesBtn.innerText.trim(), "Show Rules");
|
||||
assert.strictEqual(rulesBtn.innerText.trim(), "Show rules");
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -313,10 +313,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -316,10 +316,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -330,10 +330,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -332,10 +332,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -379,10 +379,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -387,10 +387,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -400,10 +400,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -415,10 +415,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -388,10 +388,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -455,10 +455,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -441,10 +441,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -459,10 +459,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
@@ -904,10 +904,10 @@ rulesBtn.addEventListener("click", () => {
|
||||
isModalShowing = !isModalShowing;
|
||||
|
||||
if (isModalShowing) {
|
||||
rulesBtn.textContent = "Hide Rules";
|
||||
rulesBtn.textContent = "Hide rules";
|
||||
rulesContainer.style.display = "block";
|
||||
} else {
|
||||
rulesBtn.textContent = "Show Rules";
|
||||
rulesBtn.textContent = "Show rules";
|
||||
rulesContainer.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user