diff --git a/curriculum/challenges/english/04-data-visualization/json-apis-and-ajax/get-json-with-the-javascript-xmlhttprequest-method.english.md b/curriculum/challenges/english/04-data-visualization/json-apis-and-ajax/get-json-with-the-javascript-xmlhttprequest-method.english.md
index 2deb30361d..6d7f42a309 100644
--- a/curriculum/challenges/english/04-data-visualization/json-apis-and-ajax/get-json-with-the-javascript-xmlhttprequest-method.english.md
+++ b/curriculum/challenges/english/04-data-visualization/json-apis-and-ajax/get-json-with-the-javascript-xmlhttprequest-method.english.md
@@ -36,7 +36,7 @@ tests:
- text: Your code should use the send
method to send the request.
testString: assert(code.match(/\.send\(\s*\)/g), 'Your code should use the send
method to send the request.');
- text: Your code should have an onload
event handler set to a function.
- testString: assert(code.match(/\.onload\s*=\s*function\s*?\(\s*?\)\s*?{/g), 'Your code should have an onload
event handler set to a function.');
+ testString: assert(code.match(/\.onload\s*=\s*(function|\(\s*?\))\s*?(\(\s*?\)|\=\>)\s*?{/g), 'Your code should have an onload
event handler set to a function.');
- text: Your code should use the JSON.parse
method to parse the responseText
.
testString: assert(code.match(/JSON\s*\.parse\(.*\.responseText\)/g), 'Your code should use the JSON.parse
method to parse the responseText
.');
- text: Your code should get the element with class message
and change its inner HTML to the string of JSON data.
@@ -89,7 +89,7 @@ tests:
}
@@ -110,5 +110,53 @@ tests: ```js // solution required + + +
+ +
```