fix(curriculum): rephrased instructions for assigning the variable currentContent (#62317)

This commit is contained in:
l3onhard
2025-09-23 07:00:32 +02:00
committed by GitHub
parent 572a58f8cd
commit 0eab63f2c5
@@ -7,7 +7,7 @@ dashedName: step-7
# --description--
Right now, `currentContent` is initialized with the value of an empty string. But the desired result would be to have `currentContent` hold the value of the current note text.
Right now, `currentContent` is initialized with the value of an empty string. But the desired result would be to have `currentContent` hold the value of the current note text.
In an earlier lecture, you learned how to work with the `DOMContentLoaded` event like this:
@@ -19,7 +19,7 @@ window.addEventListener("DOMContentLoaded", () => {
When everything in the HTML document has been loaded and parsed, you will be able to access the `noteEl` safely.
Start by attaching an `addEventListener` method to the `window` object. The first argument for the `addEventListener` method should be the `"DOMContentLoaded"` event. The second argument should be an arrow function. Inside the body of the arrow function, reassign `currentContent` to the value of `noteEl.textContent`.
Start by attaching an `addEventListener` method to the `window` object. The first argument for the `addEventListener` method should be the `"DOMContentLoaded"` event. The second argument should be an arrow function. Inside the body of the arrow function, assign the value of `noteEl.textContent` to `currentContent`.
# --hints--
@@ -35,7 +35,7 @@ Your event listener should listen for the `"DOMContentLoaded"` event.
assert.match(code, /window\.addEventListener\(['"]DOMContentLoaded['"]\,/);
```
Inside the body of the arrow function, you should reassign `currentContent` to the value of `noteEl.textContent`.
Inside the body of the arrow function, assign the value of `noteEl.textContent` to `currentContent`.
```js
const event = new Event("DOMContentLoaded");
@@ -61,15 +61,15 @@ assert.equal(currentContent, noteEl.textContent);
<p class="helper-text">Click or tap on the card to edit your note.</p>
<div id="note" class="note" contenteditable="true" aria-label="Note editor">
Many languages have words that carry meanings so specific or culturally rooted that they can't be neatly translated into English.
Many languages have words that carry meanings so specific or culturally rooted that they can't be neatly translated into English.
One example is the Japanese word "tsundoku", which refers to the habit of acquiring books and letting them pile up unread, something many book lovers can relate to. Another is the Portuguese word "saudade", describing a deep, bittersweet longing for something or someone that is absent. Meanwhile, the French word "Dépaysement" captures the disorienting yet exciting feeling of being in a new place, far from home.
These unique words remind us that language is more than vocabulary: it's a window into the values, habits, and emotions of the cultures that create it.
</div>
<div id="status" aria-live="polite"></div>
<script src="script.js"></script>
</body>
</html>