diff --git a/challenges/04-data-visualization/json-apis-and-ajax.json b/challenges/04-data-visualization/json-apis-and-ajax.json
index 37dfe43c22..9ce28d7d1e 100644
--- a/challenges/04-data-visualization/json-apis-and-ajax.json
+++ b/challenges/04-data-visualization/json-apis-and-ajax.json
@@ -101,16 +101,16 @@
"When the click event happens, you can use JavaScript to update an HTML element.",
"For example, when a user clicks the \"Get Message\" button, it changes the text of the element with the class message
to say \"Here is the message\".",
"This works by adding the following code within the click event:",
- "document.getElementsByClassName('message')[0].innerHTML=\"Here is the message\";
",
+ "document.getElementsByClassName('message')[0].textContent=\"Here is the message\";
",
"
onclick
event handler to change the text inside the message
element to say \"Here is the message\"."
],
"tests": [
{
"text":
- "Your code should use the document.getElementsByClassName
method to select the element with class message
and set its innerHTML
to the given string.",
+ "Your code should use the document.getElementsByClassName
method to select the element with class message
and set its textContent
to the given string.",
"testString":
- "assert(code.match(/document\\.getElementsByClassName\\(\\s*?('|\")message\\1\\s*?\\)\\[0\\]\\.innerHTML\\s*?=\\s*?('|\")Here is the message\\2/g), 'Your code should use the document.getElementsByClassName
method to select the element with class message
and set its innerHTML
to the given string.');"
+ "assert(code.match(/document\\.getElementsByClassName\\(\\s*?('|\")message\\1\\s*?\\)\\[0\\]\\.textContent\\s*?=\\s*?('|\")Here is the message\\2/g), 'Your code should use the document.getElementsByClassName
method to select the element with class message
and set its textContent
to the given string.');"
}
],
"solutions": [],