From 17585b63f8e6115d1b6349e810bb64d9528fd419 Mon Sep 17 00:00:00 2001
From: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
Date: Tue, 21 Apr 2020 08:12:53 +0100
Subject: [PATCH] added const to test string (#38583)
---
...h-the-keys-of-an-object-with-a-for...in-statement.english.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-the-keys-of-an-object-with-a-for...in-statement.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-the-keys-of-an-object-with-a-for...in-statement.english.md
index a32134e1b8..68d19617dd 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-the-keys-of-an-object-with-a-for...in-statement.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-the-keys-of-an-object-with-a-for...in-statement.english.md
@@ -54,7 +54,7 @@ We've defined a function countOnline
which accepts one argument (a
```yml
tests:
- text: The function countOnline
should use a `for in` statement to iterate through the object keys of the object passed to it.
- testString: assert(code.match(/for\s*\(\s*(var|let)\s+[a-zA-Z_$]\w*\s+in\s+[a-zA-Z_$]\w*\s*\)\s*{/));
+ testString: assert(code.match(/for\s*\(\s*(var|let|const)\s+[a-zA-Z_$]\w*\s+in\s+[a-zA-Z_$]\w*\s*\)\s*{/));
- text: 'The function countOnline
should return 1
when the object { Alan: { online: false }, Jeff: { online: true }, Sarah: { online: false } }
is passed to it'
testString: assert(countOnline(usersObj1) === 1);
- text: 'The function countOnline
should return 2
when the object { Alan: { online: true }, Jeff: { online: false }, Sarah: { online: true } }
is passed to it'