From 435fa6e8b3f0da872888b4e06088a374422b90ba Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Fri, 27 May 2022 01:47:27 -0700 Subject: [PATCH] fix(curriculum): editable region boundaries to the JS projects. (#46167) --- .../step-001.md | 2 ++ .../step-002.md | 2 ++ .../step-003.md | 2 ++ .../step-004.md | 2 ++ .../step-005.md | 2 ++ .../step-006.md | 2 ++ .../step-007.md | 2 ++ .../step-008.md | 2 ++ .../step-009.md | 2 ++ .../step-010.md | 2 ++ .../step-011.md | 2 ++ .../step-012.md | 2 ++ .../step-013.md | 2 ++ .../step-014.md | 2 ++ .../step-015.md | 2 ++ .../step-016.md | 2 ++ .../step-017.md | 2 ++ .../step-018.md | 2 ++ .../step-019.md | 2 ++ .../step-020.md | 2 ++ .../step-021.md | 2 ++ .../step-022.md | 2 ++ .../step-023.md | 2 ++ .../step-024.md | 2 ++ .../step-025.md | 2 ++ .../step-026.md | 2 ++ .../step-027.md | 2 ++ .../step-028.md | 3 +++ .../step-029.md | 2 ++ .../step-030.md | 2 ++ .../step-031.md | 2 ++ .../step-032.md | 2 ++ .../step-033.md | 2 ++ .../step-034.md | 2 ++ .../step-035.md | 2 ++ .../step-036.md | 2 ++ .../step-037.md | 2 ++ .../step-038.md | 2 ++ .../step-039.md | 2 ++ .../step-040.md | 2 ++ .../step-041.md | 2 ++ .../step-042.md | 2 ++ .../step-043.md | 2 ++ .../step-044.md | 2 ++ .../step-045.md | 2 ++ .../step-046.md | 2 ++ .../step-047.md | 2 ++ .../step-048.md | 2 ++ .../step-049.md | 2 ++ .../step-050.md | 2 ++ .../step-051.md | 2 ++ .../step-052.md | 2 ++ .../step-053.md | 2 ++ .../step-054.md | 2 ++ .../step-055.md | 2 ++ .../step-056.md | 2 ++ .../step-057.md | 2 ++ .../step-058.md | 2 ++ .../step-059.md | 2 ++ .../step-060.md | 2 ++ .../step-061.md | 2 ++ .../step-062.md | 2 ++ .../step-063.md | 2 ++ .../step-064.md | 2 ++ .../step-065.md | 2 ++ .../step-066.md | 2 ++ .../step-067.md | 2 ++ .../step-068.md | 2 ++ .../step-069.md | 2 ++ .../step-070.md | 2 ++ .../step-071.md | 2 ++ .../step-072.md | 2 ++ .../step-073.md | 2 ++ .../step-074.md | 2 ++ .../step-075.md | 2 ++ .../step-076.md | 2 ++ .../step-077.md | 2 ++ .../step-078.md | 2 ++ .../step-079.md | 2 ++ .../step-080.md | 2 ++ .../step-081.md | 2 ++ .../step-082.md | 2 ++ .../step-083.md | 2 ++ .../step-084.md | 2 ++ .../step-085.md | 4 ++++ .../step-086.md | 3 +++ .../step-087.md | 2 ++ .../step-088.md | 2 ++ .../step-089.md | 2 ++ .../step-090.md | 3 +++ .../step-091.md | 2 ++ .../step-092.md | 2 ++ .../step-093.md | 2 ++ .../step-094.md | 2 ++ .../step-095.md | 2 ++ .../step-096.md | 2 ++ .../step-097.md | 2 ++ .../step-098.md | 2 ++ .../step-099.md | 2 ++ .../step-100.md | 2 ++ .../step-101.md | 2 ++ .../step-102.md | 2 ++ .../step-103.md | 2 ++ .../step-104.md | 2 ++ .../step-105.md | 2 ++ .../step-106.md | 2 ++ .../step-107.md | 2 ++ .../step-108.md | 2 ++ .../step-109.md | 2 ++ .../step-110.md | 2 ++ .../step-111.md | 2 ++ .../step-112.md | 2 ++ .../step-113.md | 2 ++ .../step-114.md | 2 ++ .../step-115.md | 2 ++ .../step-116.md | 2 ++ .../step-117.md | 3 +++ .../step-118.md | 2 ++ .../step-119.md | 2 ++ .../step-120.md | 2 ++ .../step-121.md | 2 ++ .../step-122.md | 2 ++ .../step-123.md | 2 ++ .../step-124.md | 2 ++ .../step-125.md | 2 ++ .../step-126.md | 2 ++ .../step-127.md | 2 ++ .../step-128.md | 2 ++ .../step-129.md | 2 ++ .../step-130.md | 2 ++ .../step-131.md | 2 ++ .../step-132.md | 2 ++ .../step-133.md | 2 ++ .../step-134.md | 3 +++ .../step-135.md | 2 ++ .../step-136.md | 3 +++ .../step-137.md | 3 +++ .../step-138.md | 2 ++ .../step-139.md | 2 ++ .../step-140.md | 2 ++ .../step-141.md | 2 ++ .../step-142.md | 2 ++ .../step-143.md | 2 ++ .../step-144.md | 2 ++ .../step-145.md | 2 ++ .../step-146.md | 2 ++ .../step-147.md | 2 ++ .../step-148.md | 2 ++ .../step-149.md | 2 ++ .../step-150.md | 2 ++ .../step-151.md | 2 ++ .../step-152.md | 2 ++ .../step-001.md | 2 ++ .../step-002.md | 2 ++ .../step-003.md | 2 ++ .../step-004.md | 3 +++ .../step-005.md | 2 ++ .../step-006.md | 2 ++ .../step-007.md | 2 ++ .../step-008.md | 2 ++ .../step-009.md | 2 ++ .../step-010.md | 2 ++ .../step-011.md | 2 ++ .../step-012.md | 2 ++ .../step-013.md | 2 ++ .../step-014.md | 2 ++ .../step-015.md | 2 ++ .../step-016.md | 2 ++ .../step-017.md | 2 ++ .../step-018.md | 2 ++ .../step-019.md | 2 ++ .../step-020.md | 2 ++ .../step-021.md | 2 ++ .../step-022.md | 2 ++ .../step-023.md | 2 ++ .../step-024.md | 2 ++ .../step-025.md | 2 ++ .../step-026.md | 2 ++ .../step-027.md | 2 ++ .../step-028.md | 2 ++ .../step-029.md | 2 ++ .../step-030.md | 2 ++ .../step-031.md | 2 ++ .../step-032.md | 2 ++ .../step-033.md | 2 ++ .../step-034.md | 2 ++ .../step-035.md | 2 ++ .../step-036.md | 2 ++ .../step-037.md | 2 ++ .../step-038.md | 2 ++ .../step-039.md | 2 ++ .../step-040.md | 2 ++ .../step-041.md | 2 ++ .../step-042.md | 2 ++ .../step-043.md | 2 ++ .../step-044.md | 2 ++ .../step-045.md | 2 ++ .../step-046.md | 2 ++ .../step-047.md | 2 ++ .../step-048.md | 2 ++ .../step-049.md | 2 ++ .../step-050.md | 3 +++ .../step-051.md | 3 +++ .../step-052.md | 2 ++ .../step-053.md | 2 ++ .../step-054.md | 2 ++ .../step-055.md | 2 ++ .../step-056.md | 2 ++ .../step-057.md | 2 ++ .../step-058.md | 2 ++ .../step-059.md | 2 ++ .../step-060.md | 2 ++ .../step-061.md | 2 ++ .../step-062.md | 2 ++ .../step-063.md | 3 +++ .../step-064.md | 2 ++ .../step-065.md | 3 +++ .../step-066.md | 2 ++ .../step-067.md | 2 ++ .../step-068.md | 2 ++ .../step-069.md | 3 +++ .../step-070.md | 2 ++ .../step-071.md | 2 ++ .../step-072.md | 2 ++ .../step-073.md | 2 ++ .../step-074.md | 2 ++ .../step-075.md | 2 ++ .../step-001.md | 2 ++ .../step-002.md | 2 ++ .../step-003.md | 2 ++ .../step-004.md | 2 ++ .../step-005.md | 2 ++ .../step-006.md | 2 ++ .../step-007.md | 2 ++ .../step-008.md | 2 ++ .../step-009.md | 2 ++ .../step-010.md | 2 ++ .../step-011.md | 2 ++ .../step-012.md | 2 ++ .../step-013.md | 2 ++ .../step-014.md | 2 ++ .../step-015.md | 2 ++ .../step-016.md | 2 ++ .../step-017.md | 2 ++ .../step-018.md | 2 ++ .../step-019.md | 2 ++ .../step-020.md | 2 ++ .../step-021.md | 2 ++ .../step-022.md | 2 ++ .../step-023.md | 2 ++ .../step-024.md | 2 ++ .../step-025.md | 2 ++ .../step-026.md | 2 ++ .../step-027.md | 2 ++ .../step-028.md | 2 ++ .../step-029.md | 2 ++ .../step-030.md | 2 ++ .../step-031.md | 2 ++ .../step-032.md | 2 ++ .../step-033.md | 2 ++ .../step-034.md | 2 ++ .../step-035.md | 2 ++ .../step-036.md | 2 ++ .../step-037.md | 2 ++ .../step-038.md | 2 ++ .../step-039.md | 2 ++ .../step-040.md | 2 ++ .../step-041.md | 2 ++ .../step-042.md | 2 ++ .../step-043.md | 2 ++ .../step-044.md | 2 ++ .../step-045.md | 2 ++ .../step-046.md | 2 ++ .../step-047.md | 2 ++ .../step-048.md | 2 ++ .../step-049.md | 2 ++ .../step-050.md | 2 ++ .../step-051.md | 2 ++ .../step-052.md | 2 ++ .../step-053.md | 2 ++ .../step-054.md | 2 ++ .../step-055.md | 2 ++ .../step-056.md | 2 ++ .../step-057.md | 2 ++ .../step-058.md | 2 ++ .../step-059.md | 2 ++ .../step-060.md | 2 ++ .../step-061.md | 2 ++ .../step-062.md | 2 ++ .../step-063.md | 2 ++ .../step-064.md | 2 ++ .../step-065.md | 2 ++ .../step-066.md | 2 ++ .../step-067.md | 2 ++ .../step-068.md | 2 ++ .../step-069.md | 2 ++ .../step-070.md | 2 ++ .../step-071.md | 2 ++ .../step-072.md | 2 ++ .../step-073.md | 2 ++ .../step-074.md | 2 ++ .../step-075.md | 2 ++ .../step-076.md | 2 ++ .../step-077.md | 2 ++ .../step-078.md | 2 ++ .../step-079.md | 2 ++ .../step-080.md | 2 ++ .../step-081.md | 2 ++ .../step-082.md | 2 ++ .../step-083.md | 2 ++ .../step-084.md | 2 ++ .../step-085.md | 2 ++ .../step-086.md | 2 ++ .../step-087.md | 2 ++ .../step-088.md | 3 ++- .../step-089.md | 2 ++ .../step-090.md | 3 ++- .../step-091.md | 2 ++ .../step-092.md | 2 ++ .../step-093.md | 2 ++ .../step-094.md | 2 ++ .../step-095.md | 2 ++ .../step-096.md | 2 ++ .../step-097.md | 2 ++ .../step-098.md | 2 ++ .../step-099.md | 2 ++ .../step-100.md | 2 ++ .../step-101.md | 2 ++ .../step-102.md | 2 ++ .../step-103.md | 2 ++ .../step-104.md | 2 ++ .../step-105.md | 2 ++ .../step-106.md | 2 ++ .../step-107.md | 2 ++ .../step-108.md | 2 ++ .../step-109.md | 2 ++ .../step-110.md | 2 ++ .../step-111.md | 2 ++ .../step-112.md | 2 ++ .../step-113.md | 2 ++ .../step-114.md | 2 ++ .../step-115.md | 2 ++ .../step-116.md | 2 ++ .../step-117.md | 2 ++ .../step-118.md | 2 ++ .../step-119.md | 2 ++ .../step-120.md | 2 ++ .../step-121.md | 2 ++ .../step-122.md | 2 ++ .../step-123.md | 2 ++ .../step-124.md | 2 ++ .../step-125.md | 2 ++ .../step-126.md | 2 ++ .../step-127.md | 2 ++ .../step-128.md | 2 ++ .../step-129.md | 2 ++ .../step-130.md | 2 ++ .../step-131.md | 2 ++ .../step-132.md | 2 ++ .../step-133.md | 2 ++ .../step-134.md | 2 ++ .../step-135.md | 2 ++ .../step-136.md | 2 ++ .../step-137.md | 2 ++ .../step-138.md | 2 ++ .../step-139.md | 2 ++ .../step-140.md | 2 ++ 367 files changed, 749 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-001.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-001.md index 20f57329bd7..6be1dd23158 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-001.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-001.md @@ -98,8 +98,10 @@ assert(health === 100); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-002.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-002.md index 6a08b7cb911..75ac09b51e9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-002.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-002.md @@ -96,9 +96,11 @@ assert(gold === 50); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-003.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-003.md index 5c2f4243f4e..f88aea84c2a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-003.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-003.md @@ -98,10 +98,12 @@ assert(currentWeapon === 0); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-004.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-004.md index f3901154d85..28c42d302b1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-004.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-004.md @@ -103,11 +103,13 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-005.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-005.md index 1c06e17af7a..281191fe171 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-005.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-005.md @@ -98,11 +98,13 @@ assert(/let\s+fighting\s*;?/.test(code) && fighting === undefined); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-006.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-006.md index d0cae1d5d56..499955e1bcb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-006.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-006.md @@ -96,12 +96,14 @@ assert(monsterHealth === undefined && inventory === undefined); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-007.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-007.md index 2755938a64e..3cc1b7680c1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-007.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-007.md @@ -98,6 +98,7 @@ assert(inventory === 'stick'); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-008.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-008.md index 9e6f0da43d9..8cebab2a5ce 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-008.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-008.md @@ -106,6 +106,7 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-009.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-009.md index 5f6b1961a8d..eaf108fc910 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-009.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-009.md @@ -96,6 +96,7 @@ assert(inventory[0] === 'stick' && inventory.length === 1); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-010.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-010.md index 2205248dd12..f6fd4a95b23 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-010.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-010.md @@ -102,6 +102,7 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-011.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-011.md index da60e97ab6b..38bfbfabdd9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-011.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-011.md @@ -103,9 +103,11 @@ let currentWeapon = 0; let fighting; let monsterHealth; let inventory = ["stick"]; +--fcc-editable-region-- let button1 = document.querySelector('#button1'); +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-012.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-012.md index 3790aaededc..f65944fd347 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-012.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-012.md @@ -133,9 +133,11 @@ let currentWeapon = 0; let fighting; let monsterHealth; let inventory = ["stick"]; +--fcc-editable-region-- const button1 = document.querySelector('#button1'); +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-013.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-013.md index da87727a50a..601c5b9a345 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-013.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-013.md @@ -116,7 +116,9 @@ const goldText = document.querySelector("#goldText"); const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-014.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-014.md index 5edd4a0c770..d776eac395b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-014.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-014.md @@ -114,10 +114,12 @@ const goldText = document.querySelector("#goldText"); const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- // initialize buttons +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-015.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-015.md index 9152b08f2f5..e564d868f9a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-015.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-015.md @@ -117,10 +117,12 @@ const goldText = document.querySelector("#goldText"); const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-016.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-016.md index 6a4a87be2b4..0be2016e9bb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-016.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-016.md @@ -124,7 +124,9 @@ const monsterHealthText = document.querySelector("#monsterHealth"); button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-017.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-017.md index 8d81b9587a8..e7978de9a2f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-017.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-017.md @@ -130,8 +130,10 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function goStore() { } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-018.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-018.md index 1d586b16263..2c9c506d5b4 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-018.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-018.md @@ -127,7 +127,9 @@ button3.onclick = fightDragon; function goStore() { console.log("Going to store.") } +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-019.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-019.md index e9c62601a9f..31ff67eb87e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-019.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-019.md @@ -133,7 +133,9 @@ function goStore() { function goCave() { console.log("Going to cave."); } +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-020.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-020.md index 70b3cbca4f6..750b6d8696f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-020.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-020.md @@ -127,9 +127,11 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function goStore() { console.log("Going to store."); } +--fcc-editable-region-- function goCave() { console.log("Going to cave."); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-021.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-021.md index 2feb48f4b4f..2b0da28c547 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-021.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-021.md @@ -129,9 +129,11 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function goStore() { button1.innerText = "Buy 10 health (10 gold)"; } +--fcc-editable-region-- function goCave() { console.log("Going to cave."); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-022.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-022.md index c2224e8d863..5d31cc8a007 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-022.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-022.md @@ -124,11 +124,13 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function goStore() { button1.innerText = "Buy 10 health (10 gold)"; button2.innerText = "Buy weapon (30 gold)"; button3.innerText = "Go to town square"; } +--fcc-editable-region-- function goCave() { console.log("Going to cave."); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-023.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-023.md index 0cc6d8545ed..6d979e6d788 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-023.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-023.md @@ -124,6 +124,7 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function goStore() { button1.innerText = "Buy 10 health (10 gold)"; button2.innerText = "Buy weapon (30 gold)"; @@ -132,6 +133,7 @@ function goStore() { button2.onclick = buyWeapon; button3.onclick = goTown; } +--fcc-editable-region-- function goCave() { console.log("Going to cave."); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-024.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-024.md index bd6615d8418..c571f35908b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-024.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-024.md @@ -141,7 +141,9 @@ function goCave() { function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-025.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-025.md index 6596565b2bb..1f94768880f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-025.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-025.md @@ -133,6 +133,7 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function goStore() { button1.innerText = "Buy 10 health (10 gold)"; button2.innerText = "Buy weapon (30 gold)"; @@ -159,6 +160,7 @@ function buyWeapon() { function goTown() { } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-026.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-026.md index 4af137caa19..6dafc5faf6b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-026.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-026.md @@ -128,6 +128,7 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function goTown() { button1.innerText = "Go to store"; button2.innerText = "Go to cave"; @@ -137,6 +138,7 @@ function goTown() { button3.onclick = fightDragon; text.innerText = "You are in the town square. You see a sign that says Store."; } +--fcc-editable-region-- function goStore() { button1.innerText = "Buy 10 health (10 gold)"; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-027.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-027.md index 6c779d37230..4ac7f1ffeac 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-027.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-027.md @@ -129,7 +129,9 @@ const monsterHealthText = document.querySelector("#monsterHealth"); button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- +--fcc-editable-region-- function goTown() { button1.innerText = "Go to store"; button2.innerText = "Go to cave"; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-028.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-028.md index 4e208f98535..88807470d40 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-028.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-028.md @@ -114,6 +114,9 @@ const goldText = document.querySelector("#goldText"); const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- + +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-029.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-029.md index e501b60f84c..4819c3823ac 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-029.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-029.md @@ -119,7 +119,9 @@ const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- const locations = []; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-030.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-030.md index 8cd3d63cedd..6b2b2db1251 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-030.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-030.md @@ -125,7 +125,9 @@ const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- const locations = [{}]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-031.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-031.md index 37b8fed5e52..b57ff8e4d8e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-031.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-031.md @@ -126,11 +126,13 @@ const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- const locations = [ { name: "town square" } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-032.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-032.md index 37eb25af4a0..e734a0f740d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-032.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-032.md @@ -121,12 +121,14 @@ const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- const locations = [ { name: "town square", "button text": [] } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-033.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-033.md index 11c527fbb78..c0e523031e1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-033.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-033.md @@ -119,12 +119,14 @@ const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- const locations = [ { name: "town square", "button text": ["Go to store", "Go to cave", "Fight dragon"] } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-034.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-034.md index 9ffcf992e00..b8a3c592579 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-034.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-034.md @@ -118,6 +118,7 @@ const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- const locations = [ { name: "town square", @@ -125,6 +126,7 @@ const locations = [ "button functions": [goStore, goCave, fightDragon] } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-035.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-035.md index 8fde46b3d64..4e847fc03af 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-035.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-035.md @@ -124,6 +124,7 @@ const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- const locations = [ { name: "town square", @@ -132,6 +133,7 @@ const locations = [ text: "You are in the town square. You see a sign that says \"Store.\"" } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-036.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-036.md index 905dbd0150d..70ae819b9da 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-036.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-036.md @@ -151,6 +151,7 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function update(location) { } @@ -173,6 +174,7 @@ function goStore() { button3.onclick = goTown; text.innerText = "You enter the store."; } +--fcc-editable-region-- function goCave() { console.log("Going to cave."); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-037.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-037.md index 7c50ee0efa6..42571267099 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-037.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-037.md @@ -147,8 +147,10 @@ function update(location) { text.innerText = "You are in the town square. You see a sign that says \"Store\"."; } +--fcc-editable-region-- function goTown() { } +--fcc-editable-region-- function goStore() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-038.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-038.md index 77192c5840c..cfc3ecfa7eb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-038.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-038.md @@ -147,9 +147,11 @@ function update(location) { text.innerText = "You are in the town square. You see a sign that says \"Store\"."; } +--fcc-editable-region-- function goTown() { update(); } +--fcc-editable-region-- function goStore() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-039.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-039.md index 6fd6638a0b4..34df678117e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-039.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-039.md @@ -145,9 +145,11 @@ function update(location) { text.innerText = "You are in the town square. You see a sign that says \"Store\"."; } +--fcc-editable-region-- function goTown() { update(locations); } +--fcc-editable-region-- function goStore() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-040.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-040.md index 0a8aad189bb..0bbe8455f0d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-040.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-040.md @@ -141,6 +141,7 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function update(location) { button1.innerText = "Go to store"; button2.innerText = "Go to cave"; @@ -150,6 +151,7 @@ function update(location) { button3.onclick = fightDragon; text.innerText = "You are in the town square. You see a sign that says \"Store\"."; } +--fcc-editable-region-- function goTown() { update(locations[0]); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-041.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-041.md index 7a4a8f05a66..088cdd1137e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-041.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-041.md @@ -141,6 +141,7 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function update(location) { button1.innerText = location["button text"]; button2.innerText = "Go to cave"; @@ -150,6 +151,7 @@ function update(location) { button3.onclick = fightDragon; text.innerText = "You are in the town square. You see a sign that says \"Store\"."; } +--fcc-editable-region-- function goTown() { update(locations[0]); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-042.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-042.md index 8dde5b45130..fe5cbb84f1e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-042.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-042.md @@ -146,6 +146,7 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function update(location) { button1.innerText = location["button text"][0]; button2.innerText = "Go to cave"; @@ -155,6 +156,7 @@ function update(location) { button3.onclick = fightDragon; text.innerText = "You are in the town square. You see a sign that says \"Store\"."; } +--fcc-editable-region-- function goTown() { update(locations[0]); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-043.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-043.md index 8f5370004fa..3cad05c3f08 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-043.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-043.md @@ -151,6 +151,7 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function update(location) { button1.innerText = location["button text"][0]; button2.innerText = location["button text"][1]; @@ -160,6 +161,7 @@ function update(location) { button3.onclick = fightDragon; text.innerText = "You are in the town square. You see a sign that says \"Store\"."; } +--fcc-editable-region-- function goTown() { update(locations[0]); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-044.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-044.md index d29a7b316ea..8807c71d449 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-044.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-044.md @@ -137,6 +137,7 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function update(location) { button1.innerText = location["button text"][0]; button2.innerText = location["button text"][1]; @@ -146,6 +147,7 @@ function update(location) { button3.onclick = location["button functions"][2]; text.innerText = "You are in the town square. You see a sign that says \"Store\"."; } +--fcc-editable-region-- function goTown() { update(locations[0]); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-045.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-045.md index 9468f0a7dd9..9e934b24021 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-045.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-045.md @@ -149,8 +149,10 @@ function goTown() { update(locations[0]); } +--fcc-editable-region-- function goStore() { } +--fcc-editable-region-- function goCave() { console.log("Going to cave."); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-046.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-046.md index 3b2f639d65d..b9dc011e1c3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-046.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-046.md @@ -127,6 +127,7 @@ const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- const locations = [ { name: "town square", @@ -141,6 +142,7 @@ const locations = [ text: "You enter the store." } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-047.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-047.md index 1091cf5c3ad..a9bbaaec82f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-047.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-047.md @@ -164,9 +164,11 @@ function goStore() { update(locations[1]); } +--fcc-editable-region-- function goCave() { console.log("Going to cave."); } +--fcc-editable-region-- function fightDragon() { console.log("Fighting dragon."); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-048.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-048.md index cb840ef9ddc..ff818678ba3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-048.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-048.md @@ -172,7 +172,9 @@ function buyHealth() { function buyWeapon() { } +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-049.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-049.md index c88c87bf6ae..18f2d873090 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-049.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-049.md @@ -169,8 +169,10 @@ function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- function buyHealth() { } +--fcc-editable-region-- function buyWeapon() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-050.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-050.md index 8ad750f1b9d..43f590d427c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-050.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-050.md @@ -167,9 +167,11 @@ function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- function buyHealth() { gold = gold - 10; } +--fcc-editable-region-- function buyWeapon() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-051.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-051.md index a65269467fa..224a4c22117 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-051.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-051.md @@ -172,10 +172,12 @@ function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- function buyHealth() { gold = gold - 10; health = health + 10; } +--fcc-editable-region-- function buyWeapon() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-052.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-052.md index 157a580c416..f6bcc7f2ccc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-052.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-052.md @@ -170,10 +170,12 @@ function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- function buyHealth() { gold -= 10; health += 10; } +--fcc-editable-region-- function buyWeapon() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-053.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-053.md index 9c29275836c..1fc400d531f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-053.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-053.md @@ -187,12 +187,14 @@ function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- function buyHealth() { gold -= 10; health += 10; goldText.innerText = gold; healthText.innerText = health; } +--fcc-editable-region-- function buyWeapon() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-054.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-054.md index 716a03a30fc..5a05448ed6e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-054.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-054.md @@ -175,6 +175,7 @@ function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- function buyHealth() { if (condition) { gold -= 10; @@ -183,6 +184,7 @@ function buyHealth() { healthText.innerText = health; } } +--fcc-editable-region-- function buyWeapon() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-055.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-055.md index defcad3336a..a4b13db4989 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-055.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-055.md @@ -176,6 +176,7 @@ function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- function buyHealth() { if (gold >= 10) { gold -= 10; @@ -184,6 +185,7 @@ function buyHealth() { healthText.innerText = health; } } +--fcc-editable-region-- function buyWeapon() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-056.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-056.md index 451150855c7..296af58ebae 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-056.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-056.md @@ -169,6 +169,7 @@ function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- function buyHealth() { if (gold >= 10) { gold -= 10; @@ -179,6 +180,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-057.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-057.md index c840db886d3..29786f1f814 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-057.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-057.md @@ -114,7 +114,9 @@ const goldText = document.querySelector("#goldText"); const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- +--fcc-editable-region-- const locations = [ { name: "town square", diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-058.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-058.md index 568304eba7c..e62cb86bddf 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-058.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-058.md @@ -120,7 +120,9 @@ const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- const weapons = []; +--fcc-editable-region-- const locations = [ { diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-059.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-059.md index 2ec39a7f254..da80e729fef 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-059.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-059.md @@ -197,8 +197,10 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-060.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-060.md index 3be3e1091fc..2bab4b8ff6a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-060.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-060.md @@ -197,11 +197,13 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-061.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-061.md index fc1252dc9b2..def7c572f33 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-061.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-061.md @@ -197,11 +197,13 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-062.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-062.md index b52630d4eb6..31d8cda887f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-062.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-062.md @@ -205,12 +205,14 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; currentWeapon += 1; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-063.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-063.md index bda92f3098b..7a24cdbbf7d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-063.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-063.md @@ -201,12 +201,14 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; currentWeapon++; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-064.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-064.md index d1890d71ebd..fedaac96fe8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-064.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-064.md @@ -197,6 +197,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; @@ -205,6 +206,7 @@ function buyWeapon() { text.innerText = "You now have a new weapon."; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-065.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-065.md index 731001d5483..81ef3f2f64f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-065.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-065.md @@ -197,6 +197,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; @@ -206,6 +207,7 @@ function buyWeapon() { text.innerText = "You now have a new weapon."; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-066.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-066.md index 7a252de6cca..6a32637e6b3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-066.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-066.md @@ -199,6 +199,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; @@ -208,6 +209,7 @@ function buyWeapon() { text.innerText = "You now have a new weapon."; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-067.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-067.md index ccdab9bfc9f..3ae3f974b7a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-067.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-067.md @@ -208,6 +208,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; @@ -217,6 +218,7 @@ function buyWeapon() { text.innerText = "You now have a new weapon."; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-068.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-068.md index 5b3355b0e9d..f6b942e5ff8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-068.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-068.md @@ -204,6 +204,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; @@ -213,6 +214,7 @@ function buyWeapon() { text.innerText = "You now have a " + newWeapon + "."; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-069.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-069.md index b54c6df1dd7..1107d79cfac 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-069.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-069.md @@ -203,6 +203,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; @@ -213,6 +214,7 @@ function buyWeapon() { inventory.push(newWeapon); } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-070.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-070.md index 0e2ac994f0d..ee778ab8d09 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-070.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-070.md @@ -203,6 +203,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; @@ -214,6 +215,7 @@ function buyWeapon() { text.innerText += " In your inventory you have: "; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-071.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-071.md index babc6b929d8..c068f113bc8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-071.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-071.md @@ -203,6 +203,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; @@ -214,6 +215,7 @@ function buyWeapon() { text.innerText += " In your inventory you have: " + inventory; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-072.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-072.md index b37944ae9c8..50a6f09b401 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-072.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-072.md @@ -208,6 +208,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (gold >= 30) { gold -= 30; @@ -221,6 +222,7 @@ function buyWeapon() { text.innerText = "You do not have enough gold to buy a weapon."; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-073.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-073.md index 433ce222707..b2c0c1f01a7 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-073.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-073.md @@ -203,6 +203,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (currentWeapon < 3) { if (gold >= 30) { @@ -218,6 +219,7 @@ function buyWeapon() { } } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-074.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-074.md index 7e8fcaa74dd..32006336bcf 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-074.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-074.md @@ -203,6 +203,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (currentWeapon < weapons.length) { if (gold >= 30) { @@ -218,6 +219,7 @@ function buyWeapon() { } } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-075.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-075.md index 98489200073..18a03c3c054 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-075.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-075.md @@ -203,6 +203,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (currentWeapon < weapons.length - 1) { if (gold >= 30) { @@ -218,6 +219,7 @@ function buyWeapon() { } } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-076.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-076.md index 3cff5bdd08f..cf6ee6194ab 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-076.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-076.md @@ -203,6 +203,7 @@ function buyHealth() { } } +--fcc-editable-region-- function buyWeapon() { if (currentWeapon < weapons.length - 1) { if (gold >= 30) { @@ -220,6 +221,7 @@ function buyWeapon() { text.innerText = "You already have the most powerful weapon!"; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-077.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-077.md index 1059b13bbb0..b209274d618 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-077.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-077.md @@ -216,7 +216,9 @@ function buyWeapon() { button2.onclick = sellWeapon; } } +--fcc-editable-region-- +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-078.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-078.md index 588c67330a6..aec2b0f7031 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-078.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-078.md @@ -221,8 +221,10 @@ function buyWeapon() { } } +--fcc-editable-region-- function sellWeapon() { } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-079.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-079.md index 2ced20d3e96..504b251bd23 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-079.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-079.md @@ -230,11 +230,13 @@ function buyWeapon() { } } +--fcc-editable-region-- function sellWeapon() { if (inventory.length > 1) { } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-080.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-080.md index 3ded9ccae9a..f99543c5662 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-080.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-080.md @@ -221,12 +221,14 @@ function buyWeapon() { } } +--fcc-editable-region-- function sellWeapon() { if (inventory.length > 1) { gold += 15; goldText.innerText = gold; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-081.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-081.md index 1b72cd17ca3..d53a1388f6e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-081.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-081.md @@ -229,6 +229,7 @@ function buyWeapon() { } } +--fcc-editable-region-- function sellWeapon() { if (inventory.length > 1) { gold += 15; @@ -236,6 +237,7 @@ function sellWeapon() { let currentWeapon; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-082.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-082.md index 81186259718..6443b0efbcf 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-082.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-082.md @@ -219,6 +219,7 @@ function buyWeapon() { } } +--fcc-editable-region-- function sellWeapon() { if (inventory.length > 1) { gold += 15; @@ -227,6 +228,7 @@ function sellWeapon() { } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-083.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-083.md index 88ff205e6ca..5ff815c248f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-083.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-083.md @@ -221,6 +221,7 @@ function buyWeapon() { } } +--fcc-editable-region-- function sellWeapon() { if (inventory.length > 1) { gold += 15; @@ -230,6 +231,7 @@ function sellWeapon() { } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-084.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-084.md index be2e8cdefe0..5d60f311b1a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-084.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-084.md @@ -222,6 +222,7 @@ function buyWeapon() { } } +--fcc-editable-region-- function sellWeapon() { if (inventory.length > 1) { gold += 15; @@ -231,6 +232,7 @@ function sellWeapon() { text.innerText += " In your inventory you have: " + inventory; } } +--fcc-editable-region-- function fightSlime() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-085.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-085.md index 29a6280c7e0..7ab7acaf3d8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-085.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-085.md @@ -121,6 +121,10 @@ const monsterStats = document.querySelector("#monsterStats"); const monsterNameText = document.querySelector("#monsterName"); const monsterHealthText = document.querySelector("#monsterHealth"); +--fcc-editable-region-- + +--fcc-editable-region-- + const weapons = [ { name: "stick", diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-086.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-086.md index 76ab742e7ea..ac7cbca6f6b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-086.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-086.md @@ -242,6 +242,7 @@ function sellWeapon() { text.innerText = "Don't sell your only weapon!"; } } +--fcc-editable-region-- function fightSlime() { } @@ -253,6 +254,8 @@ function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- + ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-087.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-087.md index 1e3795ea67d..1986854e152 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-087.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-087.md @@ -245,8 +245,10 @@ function sellWeapon() { } } +--fcc-editable-region-- function fightSlime() { } +--fcc-editable-region-- function fightBeast() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-088.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-088.md index 93cc8a7f209..e1ea646ce71 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-088.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-088.md @@ -251,12 +251,14 @@ function fightSlime() { goFight(); } +--fcc-editable-region-- function fightBeast() { } function fightDragon() { console.log("Fighting dragon."); } +--fcc-editable-region-- function goFight() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-089.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-089.md index 01570e01fd1..4d45c21084c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-089.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-089.md @@ -162,6 +162,7 @@ const monsters = [ } ]; +--fcc-editable-region-- const locations = [ { name: "town square", @@ -182,6 +183,7 @@ const locations = [ text: "You enter the cave. You see some monsters." } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-090.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-090.md index 8a954853384..e9bd12ccbf7 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-090.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-090.md @@ -266,6 +266,9 @@ function fightDragon() { function goFight() { } +--fcc-editable-region-- + +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-091.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-091.md index e03aa3c88c0..62f1e07b705 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-091.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-091.md @@ -264,8 +264,10 @@ function fightDragon() { goFight(); } +--fcc-editable-region-- function goFight() { } +--fcc-editable-region-- function attack() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-092.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-092.md index 52eaee7eebb..302eeb12198 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-092.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-092.md @@ -277,9 +277,11 @@ function fightDragon() { goFight(); } +--fcc-editable-region-- function goFight() { update(locations[3]); } +--fcc-editable-region-- function attack() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-093.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-093.md index fac7bcb4c09..a4efd1dc333 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-093.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-093.md @@ -270,10 +270,12 @@ function fightDragon() { goFight(); } +--fcc-editable-region-- function goFight() { update(locations[3]); monsterHealth = monsters[fighting].health; } +--fcc-editable-region-- function attack() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-094.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-094.md index 3a18583defe..999e6c1c192 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-094.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-094.md @@ -279,11 +279,13 @@ function fightDragon() { goFight(); } +--fcc-editable-region-- function goFight() { update(locations[3]); monsterHealth = monsters[fighting].health; monsterStats.style.display = "block"; } +--fcc-editable-region-- function attack() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-095.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-095.md index 01e3fbca480..ec0d673d9bd 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-095.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-095.md @@ -272,8 +272,10 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { } +--fcc-editable-region-- function dodge() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-096.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-096.md index dcfee0cabf6..643ccb35c2d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-096.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-096.md @@ -277,9 +277,11 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; } +--fcc-editable-region-- function dodge() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-097.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-097.md index a89180ed3ad..efa7fe60eb3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-097.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-097.md @@ -272,10 +272,12 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; } +--fcc-editable-region-- function dodge() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-098.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-098.md index 63702caa250..6621c799cd7 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-098.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-098.md @@ -272,11 +272,13 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; health -= monsters[fighting].level; } +--fcc-editable-region-- function dodge() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-099.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-099.md index 45ab968fd05..640770c56d0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-099.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-099.md @@ -278,12 +278,14 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; health -= monsters[fighting].level; monsterHealth -= weapons[currentWeapon].power; } +--fcc-editable-region-- function dodge() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-100.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-100.md index b01e1e19a4c..0c29c7a1517 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-100.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-100.md @@ -277,12 +277,14 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; health -= monsters[fighting].level; monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1; } +--fcc-editable-region-- function dodge() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-101.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-101.md index 89c199a1f00..1848ec7c553 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-101.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-101.md @@ -276,6 +276,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -284,6 +285,7 @@ function attack() { healthText.innerText = health; monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function dodge() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-102.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-102.md index eefaad7d5df..5829e5477aa 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-102.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-102.md @@ -290,6 +290,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -301,6 +302,7 @@ function attack() { lose(); } } +--fcc-editable-region-- function dodge() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-103.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-103.md index 8005af3c3c5..4eed4b4e491 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-103.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-103.md @@ -288,7 +288,9 @@ function attack() { function dodge() { } +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-104.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-104.md index 69d42981164..29135b962ec 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-104.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-104.md @@ -288,8 +288,10 @@ function attack() { } } +--fcc-editable-region-- function dodge() { } +--fcc-editable-region-- function defeatMonster() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-105.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-105.md index 229ceffc51d..1c1ec2be744 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-105.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-105.md @@ -292,8 +292,10 @@ function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; } +--fcc-editable-region-- function defeatMonster() { } +--fcc-editable-region-- function lose() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-106.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-106.md index 7bd670e908f..d889433d448 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-106.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-106.md @@ -290,9 +290,11 @@ function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; } +--fcc-editable-region-- function defeatMonster() { gold += Math.floor(monsters[fighting].level * 6.7); } +--fcc-editable-region-- function lose() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-107.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-107.md index 8eb68ab2e6d..30c8fcf6412 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-107.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-107.md @@ -294,10 +294,12 @@ function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; } +--fcc-editable-region-- function defeatMonster() { gold += Math.floor(monsters[fighting].level * 6.7); xp += monsters[fighting].level; } +--fcc-editable-region-- function lose() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-108.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-108.md index b12f8e745da..9088c7b06cb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-108.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-108.md @@ -292,6 +292,7 @@ function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; } +--fcc-editable-region-- function defeatMonster() { gold += Math.floor(monsters[fighting].level * 6.7); xp += monsters[fighting].level; @@ -299,6 +300,7 @@ function defeatMonster() { xpText.innerText = xp; } +--fcc-editable-region-- function lose() { } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-109.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-109.md index ce8171b1188..7fe08268fb2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-109.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-109.md @@ -162,6 +162,7 @@ const monsters = [ } ]; +--fcc-editable-region-- const locations = [ { name: "town square", @@ -188,6 +189,7 @@ const locations = [ text: "You are fighting a monster." } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-110.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-110.md index 5ee8837d7a5..1cfdea2dfc9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-110.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-110.md @@ -162,6 +162,7 @@ const monsters = [ } ]; +--fcc-editable-region-- const locations = [ { name: "town square", @@ -194,6 +195,7 @@ const locations = [ text: "The monster screams Arg! as it dies. You gain experience points and find gold." } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-111.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-111.md index d9bb21f1ff5..6fbab2406eb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-111.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-111.md @@ -160,6 +160,7 @@ const monsters = [ } ]; +--fcc-editable-region-- const locations = [ { name: "town square", @@ -192,6 +193,7 @@ const locations = [ text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.' } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-112.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-112.md index 89c8db19dea..ed31ccf5c8f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-112.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-112.md @@ -199,6 +199,7 @@ button1.onclick = goStore; button2.onclick = goCave; button3.onclick = fightDragon; +--fcc-editable-region-- function update(location) { button1.innerText = location["button text"][0]; button2.innerText = location["button text"][1]; @@ -208,6 +209,7 @@ function update(location) { button3.onclick = location["button functions"][2]; text.innerText = location.text; } +--fcc-editable-region-- function goTown() { update(locations[0]); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-113.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-113.md index 1a58f40c2be..88c9c8c55fc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-113.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-113.md @@ -314,8 +314,10 @@ function defeatMonster() { update(locations[4]); } +--fcc-editable-region-- function lose() { } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-114.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-114.md index fc16a45a17a..8ee9f875e24 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-114.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-114.md @@ -333,7 +333,9 @@ function defeatMonster() { function lose() { update(locations[5]); } +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-115.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-115.md index 197d2294c80..0de57082f1f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-115.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-115.md @@ -291,6 +291,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -304,6 +305,7 @@ function attack() { defeatMonster(); } } +--fcc-editable-region-- function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-116.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-116.md index 54eb6bd66e7..957cfb236a4 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-116.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-116.md @@ -305,6 +305,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -322,6 +323,7 @@ function attack() { } } } +--fcc-editable-region-- function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-117.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-117.md index f69b37cc639..653c285a08a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-117.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-117.md @@ -314,6 +314,9 @@ function defeatMonster() { function lose() { update(locations[5]); } +--fcc-editable-region-- + +--fcc-editable-region-- function restart() { xp = 0; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-118.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-118.md index 68c165507a2..4f181f255ed 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-118.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-118.md @@ -157,6 +157,7 @@ const monsters = [ } ]; +--fcc-editable-region-- const locations = [ { name: "town square", @@ -195,6 +196,7 @@ const locations = [ text: "You die. ☠️" } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-119.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-119.md index 2b93d6ae76b..1c46903b021 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-119.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-119.md @@ -298,6 +298,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -311,6 +312,7 @@ function attack() { fighting === 2 ? winGame() : defeatMonster(); } } +--fcc-editable-region-- function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-120.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-120.md index 7b31e33093b..45e45af1d4c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-120.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-120.md @@ -307,7 +307,9 @@ function attack() { fighting === 2 ? winGame() : defeatMonster(); } } +--fcc-editable-region-- +--fcc-editable-region-- function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-121.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-121.md index 36181879ebf..61569608809 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-121.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-121.md @@ -310,9 +310,11 @@ function attack() { } } +--fcc-editable-region-- function getMonsterAttackValue(level) { } +--fcc-editable-region-- function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-122.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-122.md index d09e12b2d2b..8f8845d28d0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-122.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-122.md @@ -312,9 +312,11 @@ function attack() { } } +--fcc-editable-region-- function getMonsterAttackValue(level) { const hit = (level * 5) - (Math.floor(Math.random() * xp)); } +--fcc-editable-region-- function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-123.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-123.md index c57171f7411..f5a00530af8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-123.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-123.md @@ -318,10 +318,12 @@ function attack() { } } +--fcc-editable-region-- function getMonsterAttackValue(level) { const hit = (level * 5) - (Math.floor(Math.random() * xp)); console.log(hit); } +--fcc-editable-region-- function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-124.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-124.md index 1a7e97dc6ae..f39bc19d78b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-124.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-124.md @@ -320,11 +320,13 @@ function attack() { } } +--fcc-editable-region-- function getMonsterAttackValue(level) { const hit = (level * 5) - (Math.floor(Math.random() * xp)); console.log(hit); return hit; } +--fcc-editable-region-- function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-125.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-125.md index 2161e069e1b..7c8609e3249 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-125.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-125.md @@ -299,6 +299,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -312,6 +313,7 @@ function attack() { fighting === 2 ? winGame() : defeatMonster(); } } +--fcc-editable-region-- function getMonsterAttackValue(level) { const hit = (level * 5) - (Math.floor(Math.random() * xp)); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-126.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-126.md index 6051ca5b453..02324cda710 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-126.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-126.md @@ -306,6 +306,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -323,6 +324,7 @@ function attack() { fighting === 2 ? winGame() : defeatMonster(); } } +--fcc-editable-region-- function getMonsterAttackValue(level) { const hit = (level * 5) - (Math.floor(Math.random() * xp)); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-127.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-127.md index 057b92ae414..db612f5a93c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-127.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-127.md @@ -298,6 +298,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -314,6 +315,7 @@ function attack() { fighting === 2 ? winGame() : defeatMonster(); } } +--fcc-editable-region-- function getMonsterAttackValue(level) { const hit = (level * 5) - (Math.floor(Math.random() * xp)); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-128.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-128.md index aefeb675e51..8b6b2680924 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-128.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-128.md @@ -332,7 +332,9 @@ function getMonsterAttackValue(level) { console.log(hit); return hit > 0 ? hit : 0; } +--fcc-editable-region-- +--fcc-editable-region-- function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; } diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-129.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-129.md index 19699584e6f..b16bd94656c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-129.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-129.md @@ -327,9 +327,11 @@ function getMonsterAttackValue(level) { return hit > 0 ? hit : 0; } +--fcc-editable-region-- function isMonsterHit() { return Math.random() > .2; } +--fcc-editable-region-- function dodge() { text.innerText = "You dodge the attack from the " + monsters[fighting].name + "."; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-130.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-130.md index 8be35349312..3d9e25b8f83 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-130.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-130.md @@ -297,6 +297,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -315,6 +316,7 @@ function attack() { fighting === 2 ? winGame() : defeatMonster(); } } +--fcc-editable-region-- function getMonsterAttackValue(level) { const hit = (level * 5) - (Math.floor(Math.random() * xp)); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-131.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-131.md index fd2d242e61a..3f3c5da2ad7 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-131.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-131.md @@ -312,6 +312,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -334,6 +335,7 @@ function attack() { } } +--fcc-editable-region-- function getMonsterAttackValue(level) { const hit = (level * 5) - (Math.floor(Math.random() * xp)); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-132.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-132.md index df68f2bb8d5..e4ae436254a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-132.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-132.md @@ -298,6 +298,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -320,6 +321,7 @@ function attack() { text.innerText += " Your " + inventory.pop() + " breaks."; } } +--fcc-editable-region-- function getMonsterAttackValue(level) { const hit = (level * 5) - (Math.floor(Math.random() * xp)); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-133.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-133.md index 2ee219c7dbb..6a3acd2f587 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-133.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-133.md @@ -308,6 +308,7 @@ function goFight() { monsterHealthText.innerText = monsterHealth; } +--fcc-editable-region-- function attack() { text.innerText = "The " + monsters[fighting].name + " attacks."; text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; @@ -331,6 +332,7 @@ function attack() { currentWeapon--; } } +--fcc-editable-region-- function getMonsterAttackValue(level) { const hit = (level * 5) - (Math.floor(Math.random() * xp)); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-134.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-134.md index 9deeb2dc71d..b3a062fc19c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-134.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-134.md @@ -363,6 +363,9 @@ function restart() { xpText.innerText = xp; goTown(); } +--fcc-editable-region-- + +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-135.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-135.md index 3bffb22d939..99416aeec70 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-135.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-135.md @@ -163,6 +163,7 @@ const monsters = [ } ]; +--fcc-editable-region-- const locations = [ { name: "town square", @@ -207,6 +208,7 @@ const locations = [ text: "You defeat the dragon! YOU WIN THE GAME! 🎉" } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-136.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-136.md index 4fea2ef564a..168f19f1f76 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-136.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-136.md @@ -375,6 +375,9 @@ function easterEgg() { update(locations[7]); } +--fcc-editable-region-- + +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-137.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-137.md index 0e4bee42617..b707347d32f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-137.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-137.md @@ -375,6 +375,9 @@ function pickEight() { pick(8); } +--fcc-editable-region-- + +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-138.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-138.md index e398bc4a252..7fd079db470 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-138.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-138.md @@ -380,9 +380,11 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-139.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-139.md index 4dd13fa1eeb..3f45adcb867 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-139.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-139.md @@ -394,9 +394,11 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-140.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-140.md index 7149f553592..30f62a0c22c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-140.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-140.md @@ -380,12 +380,14 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { } } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-141.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-141.md index 6c0daac0292..75e21830b61 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-141.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-141.md @@ -376,12 +376,14 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { numbers.push(Math.floor(Math.random() * 11)); } } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-142.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-142.md index aed0ef7d3fd..63c76f7c69f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-142.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-142.md @@ -388,6 +388,7 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { @@ -396,6 +397,7 @@ function pick(guess) { text.innerText = "You picked " + guess + ". Here are the random numbers:"; } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-143.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-143.md index 90b855592da..64536ed94d3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-143.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-143.md @@ -383,6 +383,7 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { @@ -391,6 +392,7 @@ function pick(guess) { text.innerText = "You picked " + guess + ". Here are the random numbers:\n"; } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-144.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-144.md index 0b8e6e76c43..f427659c5ab 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-144.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-144.md @@ -379,6 +379,7 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { @@ -391,6 +392,7 @@ function pick(guess) { } } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-145.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-145.md index 26e18a7c56e..3268afb2fcc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-145.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-145.md @@ -377,6 +377,7 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { @@ -389,6 +390,7 @@ function pick(guess) { } } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-146.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-146.md index 48e91cf293f..7b36211e6ac 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-146.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-146.md @@ -377,6 +377,7 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { @@ -389,6 +390,7 @@ function pick(guess) { } } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-147.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-147.md index 42649e01c7a..dd6d8a5d8d8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-147.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-147.md @@ -380,6 +380,7 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { @@ -392,6 +393,7 @@ function pick(guess) { } } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-148.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-148.md index ef905ff4f7c..9497ccac3be 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-148.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-148.md @@ -382,6 +382,7 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { @@ -394,6 +395,7 @@ function pick(guess) { text.innerText += numbers[i] + "\n"; } } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-149.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-149.md index 001a33b853c..587b02b9759 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-149.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-149.md @@ -382,6 +382,7 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { @@ -398,6 +399,7 @@ function pick(guess) { } } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-150.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-150.md index 4cbeb36e55e..57b19dde1ee 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-150.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-150.md @@ -383,6 +383,7 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { @@ -401,6 +402,7 @@ function pick(guess) { goldText.innerText = gold; } } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-151.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-151.md index 426f6020e2c..cf4e46bc6c2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-151.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-151.md @@ -382,6 +382,7 @@ function pickEight() { pick(8); } +--fcc-editable-region-- function pick(guess) { let numbers = []; while(numbers.length < 10) { @@ -404,6 +405,7 @@ function pick(guess) { healthText.innerText = health; } } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-152.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-152.md index dd5e0b96b45..ccd5e32b2b3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-152.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/step-152.md @@ -162,6 +162,7 @@ const monsters = [ } ]; +--fcc-editable-region-- const locations = [ { name: "town square", @@ -212,6 +213,7 @@ const locations = [ text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!" } ]; +--fcc-editable-region-- // initialize buttons button1.onclick = goStore; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-001.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-001.md index 71481007a6e..a2ce162457c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-001.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-001.md @@ -85,7 +85,9 @@ assert(code.replace(/\s/g, '').match(/console\.log\(document\)/)); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-002.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-002.md index 829b5294b79..aab244748d6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-002.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-002.md @@ -98,7 +98,9 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-003.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-003.md index d8c5d7e9627..31afd7303fc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-003.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-003.md @@ -104,7 +104,9 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-004.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-004.md index 6d11129b365..bcd3b1bc287 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-004.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-004.md @@ -95,6 +95,9 @@ assert(typeof calculate === 'function'); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-005.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-005.md index efb61cfd3a3..8a02a67b570 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-005.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-005.md @@ -96,9 +96,11 @@ assert(calculate.toString().match(/function calculate\(\s*e\)\s*\{\s*\}/)); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-006.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-006.md index 3b2800d27d4..0cd5d1525fd 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-006.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-006.md @@ -92,9 +92,11 @@ assert(calculate.toString().match(/e\.preventDefault\(\s*\)/)); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-007.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-007.md index 6ad2f037d41..ee8e8356f0d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-007.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-007.md @@ -98,11 +98,13 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-008.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-008.md index c7cb8904d7c..9b80e0f827c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-008.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-008.md @@ -94,12 +94,14 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-009.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-009.md index 9bd31bd93bd..c5a2856f2c3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-009.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-009.md @@ -96,12 +96,14 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-010.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-010.md index c89f460b152..40f6a846fd5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-010.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-010.md @@ -90,12 +90,14 @@ assert(/const\s*meal\s*=\s*total\[0\]/.test(code)); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-011.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-011.md index 37dbc37897d..725bff25987 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-011.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-011.md @@ -90,6 +90,7 @@ See description above for instructions. ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-012.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-012.md index 121329859bb..fead88a0598 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-012.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-012.md @@ -101,6 +101,7 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-013.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-013.md index efdd44e9cfb..714497fddbb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-013.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-013.md @@ -98,6 +98,7 @@ assert(code.replace(/\s/g, '').match(/map\(function\(\s*meal\)\{\}\)/)); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-014.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-014.md index 2b3ee38d6cd..7d58167b80c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-014.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-014.md @@ -94,6 +94,7 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-015.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-015.md index 2604fe57619..4a199951818 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-015.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-015.md @@ -90,6 +90,7 @@ assert(code.replace(/\s/g, '').match(/Number\(meal\.value\)\;?/)); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-016.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-016.md index 750c171fcda..6058cea614a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-016.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-016.md @@ -90,6 +90,7 @@ assert(code.replace(/\s/g, '').match(/meal\=\>Number\(meal\.value\)/)); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-017.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-017.md index 3609c4209bc..46dfade8b55 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-017.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-017.md @@ -92,6 +92,7 @@ assert(code.replace(/\s/g, '').match(/Number\(meal\.value\)\)\.reduce\(\)/)); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-018.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-018.md index 56c0b676dcc..065b5dce513 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-018.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-018.md @@ -106,6 +106,7 @@ assert( ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-019.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-019.md index 9e6d6d4851f..448c7702610 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-019.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-019.md @@ -109,12 +109,14 @@ assert( function calculate(e) { e.preventDefault(); +--fcc-editable-region-- const total = Array.from(document.getElementsByClassName('cal-control')) .map(meal => Number(meal.value)) .reduce((accumulator, currentValue) => { /* code to run */ }); } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-020.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-020.md index cd007dc76be..4134f0401a2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-020.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-020.md @@ -117,12 +117,14 @@ assert( function calculate(e) { e.preventDefault(); +--fcc-editable-region-- const total = Array.from(document.getElementsByClassName('cal-control')) .map(meal => Number(meal.value)) .reduce((accumulator, currentValue) => { /* code to run */ }, 0); } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-021.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-021.md index 2e47bc05830..c9d4f5bd8ad 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-021.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-021.md @@ -96,6 +96,7 @@ assert(code.replace(/\s/g, '').match(/console.log\({accumulator}\)/)); ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-022.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-022.md index 59a97873d63..b36ed2d97b6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-022.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-022.md @@ -104,6 +104,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-023.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-023.md index f4eb87288e7..8825fbe6dd0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-023.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-023.md @@ -102,6 +102,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-024.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-024.md index c79672514e1..1e19c715fcf 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-024.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-024.md @@ -98,6 +98,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-025.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-025.md index 31248302aff..21d83417535 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-025.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-025.md @@ -108,6 +108,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-026.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-026.md index 10ff81437ab..abe960e3120 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-026.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-026.md @@ -94,6 +94,7 @@ assert(/const\s*difference\s*\=\s*total\s*\-\s*maxCalories?/.test(code)); ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-027.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-027.md index 7d470ade534..ad3abc0bfe5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-027.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-027.md @@ -102,6 +102,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-028.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-028.md index 77d9850849b..2dbdd8b547b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-028.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-028.md @@ -100,6 +100,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-029.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-029.md index 53f518c0a59..87062f28e7f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-029.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-029.md @@ -104,6 +104,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-030.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-030.md index 37b142ba761..90ad3c91cb4 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-030.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-030.md @@ -104,6 +104,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-031.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-031.md index 38e995e1433..b93248efe69 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-031.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-031.md @@ -100,6 +100,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-032.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-032.md index 735e289f661..fd08248b5f0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-032.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-032.md @@ -100,6 +100,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-033.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-033.md index 2a4ab5c38b4..f066a2b3607 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-033.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-033.md @@ -96,6 +96,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-034.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-034.md index 055a9757ab5..d2e8c9a31c3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-034.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-034.md @@ -98,6 +98,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-035.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-035.md index da1e35be095..1311c2ac849 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-035.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-035.md @@ -106,6 +106,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-036.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-036.md index 9ab54a78c02..923d7d02e23 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-036.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-036.md @@ -96,6 +96,7 @@ assert(code.replace(/\s/g, '').match(/result\.appendChild\(resultText\)/)); ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-037.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-037.md index 206bce04189..09da32b6cb5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-037.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-037.md @@ -94,6 +94,7 @@ assert(code.replace(/\s/g, '').match(/output\.appendChild\(result\)/)); ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-038.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-038.md index 7bdd64d9319..ccb8660bf13 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-038.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-038.md @@ -96,6 +96,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-039.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-039.md index 042fb45dd00..e0f9bd9c47c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-039.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-039.md @@ -92,6 +92,7 @@ assert(code.replace(/\s/g, '').match(/output\.appendChild\(line\)/)); ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-040.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-040.md index c3988cf6379..4c4b069fb43 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-040.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-040.md @@ -98,6 +98,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-041.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-041.md index 74120a2542e..0becd375fa5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-041.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-041.md @@ -98,6 +98,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-042.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-042.md index defae2a104c..fd2d846ab52 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-042.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-042.md @@ -100,6 +100,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-043.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-043.md index 8cc72ad1382..9e9d9c9c3f2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-043.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-043.md @@ -96,6 +96,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-044.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-044.md index 695206f70ef..9264e8ac9cf 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-044.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-044.md @@ -92,6 +92,7 @@ assert(code.replace(/\s/g, '').match(/output\.appendChild\(recommended\)/)); ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-045.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-045.md index 862682f2aa0..0fd8978f093 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-045.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-045.md @@ -98,6 +98,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-046.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-046.md index 8be22ea25fc..6bb2536f422 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-046.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-046.md @@ -104,6 +104,7 @@ assert( ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-047.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-047.md index 551b2c80ceb..29d043f4c6e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-047.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-047.md @@ -92,6 +92,7 @@ assert(code.replace(/\s/g, '').match(/output\.appendChild\(consumed\)/)); ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-048.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-048.md index 92df3992f2b..c34dcad8f68 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-048.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-048.md @@ -115,11 +115,13 @@ assert( const output = document.getElementById('output'); +--fcc-editable-region-- const result = document.createElement('h3'); //put your code here const resultText = document.createTextNode( `${Math.abs(difference)} Calorie ${surplusOrDeficit}` ); +--fcc-editable-region-- result.appendChild(resultText); output.appendChild(result); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-049.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-049.md index c439034ba39..7298971ffec 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-049.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-049.md @@ -140,9 +140,11 @@ assert( const consumed = document.createElement('h4'); consumed.innerHTML = `${total} Consumed Calories`; output.appendChild(consumed); +--fcc-editable-region-- //put your code here } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-050.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-050.md index 5710ffb5e2c..1b0bd348910 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-050.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-050.md @@ -139,8 +139,11 @@ assert( consumed.innerHTML = `${total} Consumed Calories`; output.appendChild(consumed); +--fcc-editable-region-- output.setAttribute('class', 'bordered-class'); + } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-051.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-051.md index bfb98704318..56bbb142804 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-051.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-051.md @@ -145,7 +145,10 @@ assert( output.setAttribute('class', 'bordered-class'); output.style.backgroundColor = '#FFF9C4'; +--fcc-editable-region-- + } +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-052.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-052.md index fe53111575d..db8f9bc95c1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-052.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-052.md @@ -147,7 +147,9 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add'); +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-053.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-053.md index 689313a6afb..886f041422c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-053.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-053.md @@ -141,7 +141,9 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add').onclick = function() {}; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-054.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-054.md index f00b4000342..6860d68731d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-054.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-054.md @@ -139,9 +139,11 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add').onclick = function() { const foodInput = document.createElement('input'); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-055.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-055.md index 15b3b5dcd19..89e37a9f626 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-055.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-055.md @@ -143,10 +143,12 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add').onclick = function() { const foodInput = document.createElement('input'); foodInput.placeholder = 'food name'; }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-056.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-056.md index c4c8cd13d49..e0ab30e27b5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-056.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-056.md @@ -145,11 +145,13 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add').onclick = function() { const foodInput = document.createElement('input'); foodInput.placeholder = 'food name'; foodInput.classList.add('food-control'); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-057.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-057.md index 4df1508a420..ea1faf6c59c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-057.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-057.md @@ -139,12 +139,14 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add').onclick = function() { const foodInput = document.createElement('input'); foodInput.placeholder = 'food name'; foodInput.classList.add('food-control'); document.getElementById('entries').appendChild(foodInput); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-058.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-058.md index 4e6d068b417..594af428356 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-058.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-058.md @@ -143,6 +143,7 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add').onclick = function() { const foodInput = document.createElement('input'); foodInput.placeholder = 'food name'; @@ -151,6 +152,7 @@ assert( const calorieInput = document.createElement('input'); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-059.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-059.md index 5f1f6efc972..962a0309894 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-059.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-059.md @@ -143,6 +143,7 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add').onclick = function() { const foodInput = document.createElement('input'); foodInput.placeholder = 'food name'; @@ -152,6 +153,7 @@ assert( const calorieInput = document.createElement('input'); calorieInput.setAttribute('type', 'number'); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-060.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-060.md index f82cc26281d..eac60b49fce 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-060.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-060.md @@ -141,6 +141,7 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add').onclick = function() { const foodInput = document.createElement('input'); foodInput.placeholder = 'food name'; @@ -151,6 +152,7 @@ assert( calorieInput.setAttribute('type', 'number'); calorieInput.setAttribute('min', '0'); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-061.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-061.md index 20ea10cc1aa..7ffb7021744 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-061.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-061.md @@ -141,6 +141,7 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add').onclick = function() { const foodInput = document.createElement('input'); foodInput.placeholder = 'food name'; @@ -152,6 +153,7 @@ assert( calorieInput.setAttribute('min', '0'); calorieInput.classList.add('cal-control'); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-062.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-062.md index 9b031fff985..8e15285d2a9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-062.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-062.md @@ -143,6 +143,7 @@ assert( output.style.backgroundColor = '#FFF9C4'; } +--fcc-editable-region-- document.getElementById('add').onclick = function() { const foodInput = document.createElement('input'); foodInput.placeholder = 'food name'; @@ -155,6 +156,7 @@ assert( calorieInput.classList.add('cal-control'); calorieInput.classList.add('extra-cal-control'); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-063.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-063.md index 46cc91e229d..df36314c4ae 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-063.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-063.md @@ -156,6 +156,9 @@ assert( calorieInput.classList.add('extra-cal-control'); document.getElementById('entries').appendChild(calorieInput); }; +--fcc-editable-region-- + +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-064.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-064.md index f2a7d9b06bd..1e5b3e9b048 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-064.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-064.md @@ -149,7 +149,9 @@ assert(/clearOutput\(\)/.test(code) && /clearForm\(\)/.test(code)); document.getElementById('entries').appendChild(calorieInput); }; +--fcc-editable-region-- document.getElementById('clear').onclick = function() {}; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-065.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-065.md index 04728fc4ce2..7a941b6559c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-065.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-065.md @@ -159,6 +159,9 @@ assert(typeof clearOutput === 'function'); clearOutput(); clearForm(); }; +--fcc-editable-region-- + +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-066.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-066.md index e89ca958cc5..e6a2d2c6337 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-066.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-066.md @@ -162,7 +162,9 @@ assert( clearForm(); }; +--fcc-editable-region-- const clearOutput = () => {}; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-067.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-067.md index 2f67c780e6f..f8984120835 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-067.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-067.md @@ -166,9 +166,11 @@ assert( clearForm(); }; +--fcc-editable-region-- const clearOutput = () => { document.getElementById('output').innerHTML = ''; }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-068.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-068.md index 3723c6e0ad0..93a258c395b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-068.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-068.md @@ -94,10 +94,12 @@ assert(calculate.toString().match(/clearOutput\(\)/)); ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-070.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-070.md index bd56e1a74a2..88284a00280 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-070.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-070.md @@ -170,7 +170,9 @@ assert( document.getElementById('output').classList.remove('bordered-class'); }; +--fcc-editable-region-- const clearForm = () => {}; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-071.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-071.md index 5b33a7f2e42..9cc201d5194 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-071.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-071.md @@ -162,11 +162,13 @@ assert(code.replace(/\s/g, '').match(/foodInputs.forEach\(\)/)); document.getElementById('output').classList.remove('bordered-class'); }; +--fcc-editable-region-- const clearForm = () => { const foodInputs = Array.from( document.getElementsByClassName('food-control') ); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-072.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-072.md index fc210a22302..8044dac1e60 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-072.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-072.md @@ -166,6 +166,7 @@ assert( document.getElementById('output').classList.remove('bordered-class'); }; +--fcc-editable-region-- const clearForm = () => { const foodInputs = Array.from( document.getElementsByClassName('food-control') @@ -173,6 +174,7 @@ assert( foodInputs.forEach(); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-073.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-073.md index 8ff380812d7..dd34b193b4c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-073.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-073.md @@ -170,6 +170,7 @@ assert( document.getElementById('output').classList.remove('bordered-class'); }; +--fcc-editable-region-- const clearForm = () => { const foodInputs = Array.from( document.getElementsByClassName('food-control') @@ -177,6 +178,7 @@ assert( foodInputs.forEach(input => input.remove()); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-074.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-074.md index 720d9d76e08..652c8f99281 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-074.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-074.md @@ -169,10 +169,12 @@ assert( foodInputs.forEach(input => input.remove()); +--fcc-editable-region-- const calInputs = Array.from( document.getElementsByClassName('extra-cal-control') ); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-075.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-075.md index f544948b1b7..b3cf00545fa 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-075.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/step-075.md @@ -176,9 +176,11 @@ assert( const calInputs = Array.from( document.getElementsByClassName('extra-cal-control') ); +--fcc-editable-region-- calInputs.forEach(input => input.remove()); }; +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-001.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-001.md index ffd55741e80..08bc2a4aa43 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-001.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-001.md @@ -62,8 +62,10 @@ assert(code.replace(/\s/g, '').includes('constinfixToFunction={}')); ```html ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-002.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-002.md index b47354b1dec..3159f1d2410 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-002.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-002.md @@ -58,7 +58,9 @@ assert(code.replace(/\s/g, '').includes('functionadd(x,y){}')); ```html diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-009.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-009.md index 53cf0d29cf9..c44846417a5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-009.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-009.md @@ -61,9 +61,11 @@ assert(code.replace(/\s/g, '').match(/\+["']:\(x,y\)=>x\+y/)); const addVar = (x, y) => x + y; +--fcc-editable-region-- const infixToFunction = { "+": addVar }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-010.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-010.md index 40fb1888718..2096072d738 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-010.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-010.md @@ -59,7 +59,9 @@ assert(typeof addVar === 'undefined'); ```html diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-012.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-012.md index 14f83e7b6ce..37432637ac6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-012.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-012.md @@ -70,7 +70,9 @@ const infixToFunction = { "/": (x, y) => x / y }; +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-013.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-013.md index 0da0feb5386..3d09b3967f2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-013.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-013.md @@ -74,7 +74,9 @@ const infixToFunction = { "/": (x, y) => x / y }; +--fcc-editable-region-- const infixEval = (str, regex) => str.replace(regex, ""); +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-014.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-014.md index ca1c93273c1..0926459ef14 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-014.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-014.md @@ -70,7 +70,9 @@ const infixToFunction = { "/": (x, y) => x / y }; +--fcc-editable-region-- const infixEval = (str, regex) => str.replace(regex, infixToFunction["+"]); +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-015.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-015.md index 98e9e74f2ba..23968d2e070 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-015.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-015.md @@ -72,10 +72,12 @@ const infixToFunction = { "/": (x, y) => x / y }; +--fcc-editable-region-- const infixEval = (str, regex) => str.replace(regex, (match, arg1, fn, arg2) => infixToFunction["+"] ); +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-016.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-016.md index d96b6a2d9bf..f3dd1211e6a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-016.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-016.md @@ -74,10 +74,12 @@ const infixToFunction = { "/": (x, y) => x / y }; +--fcc-editable-region-- const infixEval = (str, regex) => str.replace(regex, (match, arg1, fn, arg2) => infixToFunction[fn] ); +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-017.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-017.md index bb7bfb098bf..e295114e777 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-017.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-017.md @@ -70,10 +70,12 @@ const infixToFunction = { "/": (x, y) => x / y }; +--fcc-editable-region-- const infixEval = (str, regex) => str.replace(regex, (match, arg1, fn, arg2) => infixToFunction[fn](parseFloat(arg1), parseFloat(arg2)) ); +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-018.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-018.md index 0b5eeae3de8..1af15a10b8e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-018.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-018.md @@ -77,7 +77,9 @@ const infixEval = (str, regex) => infixToFunction[fn](parseFloat(arg1), parseFloat(arg2)) ); +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-019.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-019.md index c66eaf246d0..5c2d8560932 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-019.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-019.md @@ -79,7 +79,9 @@ const infixEval = (str, regex) => str.replace(regex, (_, arg1, fn, arg2) => infixToFunction[fn](parseFloat(arg1), parseFloat(arg2))); +--fcc-editable-region-- const highPrecedence = str => str; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-020.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-020.md index 8ba07d3a779..1ddd40ce5d8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-020.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-020.md @@ -71,9 +71,11 @@ const infixEval = (str, regex) => infixToFunction[fn](parseFloat(arg1), parseFloat(arg2)) ); +--fcc-editable-region-- const highPrecedence = str => { return str; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-021.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-021.md index fdcf69e7ef8..3bfba3454a9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-021.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-021.md @@ -71,10 +71,12 @@ const infixEval = (str, regex) => infixToFunction[fn](parseFloat(arg1), parseFloat(arg2)) ); +--fcc-editable-region-- const highPrecedence = str => { const regex = /([0-9.]+)([*\/])([0-9.]+)/; return str; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-022.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-022.md index a1b5ab7037c..333b8bcb122 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-022.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-022.md @@ -83,11 +83,13 @@ const infixEval = (str, regex) => infixToFunction[fn](parseFloat(arg1), parseFloat(arg2)) ); +--fcc-editable-region-- const highPrecedence = str => { const regex = /([0-9.]+)([*\/])([0-9.]+)/; const str2 = infixEval(str, regex); return str2; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-023.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-023.md index 1692c3fe034..c5f666b8a05 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-023.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-023.md @@ -77,11 +77,13 @@ const infixEval = (str, regex) => infixToFunction[fn](parseFloat(arg1), parseFloat(arg2)) ); +--fcc-editable-region-- const highPrecedence = str => { const regex = /([0-9.]+)([*\/])([0-9.]+)/; const str2 = infixEval(str, regex); return str === str2 ? str : ""; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-024.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-024.md index 052946797d1..c837d8e94e1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-024.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-024.md @@ -77,7 +77,9 @@ const highPrecedence = str => { return str === str2 ? str : highPrecedence(str2); }; +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-025.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-025.md index 872da7e5967..58109dce7a4 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-025.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-025.md @@ -81,7 +81,9 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-026.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-026.md index ed92a288199..313db4427d6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-026.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-026.md @@ -85,9 +85,11 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-027.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-027.md index db4e0001ae3..bc94c78c155 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-027.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-027.md @@ -87,9 +87,11 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-028.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-028.md index 6bb77acacc6..7972802a8b8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-028.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-028.md @@ -87,10 +87,12 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-029.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-029.md index 3b99b32278f..f957c47d628 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-029.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-029.md @@ -86,11 +86,13 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; const str2 = infixEval(noHigh, infix); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-030.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-030.md index fa189f8f584..42b80301fc6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-030.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-030.md @@ -87,12 +87,14 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; const str2 = infixEval(noHigh, infix); const regex = /([a-z]*)\(([0-9., ]*)\)(?!.*\()/i; } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-031.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-031.md index 107b32385aa..33e85a097cc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-031.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-031.md @@ -91,6 +91,7 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; @@ -98,6 +99,7 @@ const applyFn = str => { const regex = /([a-z]*)\(([0-9., ]*)\)(?!.*\()/i; const toNumberList = args => args.split(","); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-032.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-032.md index 05b92686519..abb91060f5e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-032.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-032.md @@ -87,6 +87,7 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; @@ -94,6 +95,7 @@ const applyFn = str => { const regex = /([a-z]*)\(([0-9., ]*)\)(?!.*\()/i; const toNumberList = args => args.split(",").map(parseFloat); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-033.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-033.md index 1bdfaa22af5..bb2f8da03a5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-033.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-033.md @@ -87,6 +87,7 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; @@ -95,6 +96,7 @@ const applyFn = str => { const toNumberList = args => args.split(",").map(parseFloat); const applyFunction = (fn, args) => spreadsheetFunctions; } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-034.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-034.md index 651c4641a95..f32c582d3ef 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-034.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-034.md @@ -87,6 +87,7 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; @@ -95,6 +96,7 @@ const applyFn = str => { const toNumberList = args => args.split(",").map(parseFloat); const applyFunction = (fn, args) => spreadsheetFunctions[fn.toLowerCase()]; } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-035.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-035.md index 52041a73536..a460b595da1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-035.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-035.md @@ -83,6 +83,7 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; @@ -92,6 +93,7 @@ const applyFn = str => { const applyFunction = (fn, args) => spreadsheetFunctions[fn.toLowerCase()](toNumberList(args)); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-036.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-036.md index 69bdad89bb2..45e848ecbeb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-036.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-036.md @@ -85,6 +85,7 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; @@ -95,6 +96,7 @@ const applyFn = str => { spreadsheetFunctions[fn.toLowerCase()](toNumberList(args)); return str2.replace(regex, ""); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-037.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-037.md index a03de8d5a50..7394c7c6472 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-037.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-037.md @@ -89,6 +89,7 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; @@ -99,6 +100,7 @@ const applyFn = str => { spreadsheetFunctions[fn.toLowerCase()](toNumberList(args)); return str2.replace(regex, (match, fn, args) => spreadsheetFunctions); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-038.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-038.md index 0c8a1d7a02e..c86fe809104 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-038.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-038.md @@ -81,6 +81,7 @@ const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); const infix = /([0-9.]+)([+-])([0-9.]+)/; @@ -95,6 +96,7 @@ const applyFn = str => { spreadsheetFunctions.hasOwnProperty(fn.toLowerCase()) ); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-039.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-039.md index b21e077c60c..bfa91d4503f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-039.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-039.md @@ -96,7 +96,9 @@ const applyFn = str => { ); }; +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-040.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-040.md index ccfc587e5fd..24d94216931 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-040.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-040.md @@ -99,9 +99,11 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => { } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-041.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-041.md index 09bb2e5d379..4307ef2889a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-041.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-041.md @@ -96,10 +96,12 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => { const arr = [start]; return arr; } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-042.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-042.md index d086d56e696..0fa8e6fe0fb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-042.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-042.md @@ -109,11 +109,13 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => { const arr = [start]; arr.push(end); return arr; } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-043.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-043.md index 49bfe428ac2..448578598f5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-043.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-043.md @@ -103,10 +103,12 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => { const arr = [start]; return arr.concat(end); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-044.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-044.md index 31a88c59e4f..6e89d44a236 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-044.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-044.md @@ -99,10 +99,12 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => { const arr = [start]; return arr.concat([end]); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-045.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-045.md index 20613db9d17..0d876da26b6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-045.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-045.md @@ -99,9 +99,11 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => { return [start].concat([end]); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-046.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-046.md index c384f5ca0f6..ee94e71d4a4 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-046.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-046.md @@ -96,9 +96,11 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => { return start > end ? [] : [start].concat([end]); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-047.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-047.md index 752367617d2..497b63c634b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-047.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-047.md @@ -102,9 +102,11 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => { return start > end ? [] : [start].concat(range(start + 1, end)); } +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-048.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-048.md index bf876bd1959..862a0002f2f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-048.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-048.md @@ -99,7 +99,9 @@ const applyFn = str => { const range = (start, end) => start > end ? [] : [start].concat(range(start + 1, end)); +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-049.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-049.md index c735a41df3b..9845839bbeb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-049.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-049.md @@ -99,7 +99,9 @@ const applyFn = str => { const range = (start, end) => start > end ? [] : [start].concat(range(start + 1, end)); +--fcc-editable-region-- const charRange = (start, end) => start; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-050.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-050.md index 8b84baf135b..43167394a7b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-050.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-050.md @@ -99,7 +99,9 @@ const applyFn = str => { const range = (start, end) => start > end ? [] : [start].concat(range(start + 1, end)); +--fcc-editable-region-- const charRange = (start, end) => range(start, end); +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-051.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-051.md index 8cb76cd848c..f5bb024255e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-051.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-051.md @@ -103,7 +103,9 @@ const applyFn = str => { const range = (start, end) => start > end ? [] : [start].concat(range(start + 1, end)); +--fcc-editable-region-- const charRange = (start, end) => range(start.charCodeAt(0), end.charCodeAt(0)); +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-052.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-052.md index 517026af414..8369854b752 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-052.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-052.md @@ -99,7 +99,9 @@ const applyFn = str => { const range = (start, end) => start > end ? [] : [start].concat(range(start + 1, end)); +--fcc-editable-region-- const charRange = (start, end) => range(start.charCodeAt(0), end.charCodeAt(0)).map(x => x); +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-053.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-053.md index d7378d0072a..6253e20d545 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-053.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-053.md @@ -110,7 +110,9 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-054.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-054.md index 6eebcffd5f0..03ceaf96068 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-054.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-054.md @@ -108,10 +108,12 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-055.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-055.md index 158a2274a31..27b4b66f7f2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-055.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-055.md @@ -108,10 +108,12 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => n1; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-056.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-056.md index 473a93c34fa..72223dddb2c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-056.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-056.md @@ -108,10 +108,12 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(n1, n2); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-057.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-057.md index af791b45fca..1870ab8b951 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-057.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-057.md @@ -106,10 +106,12 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-058.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-058.md index ca5d12eae97..b394d603ed4 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-058.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-058.md @@ -108,6 +108,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -115,6 +116,7 @@ const evalFormula = x => { return n; }; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-059.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-059.md index a6d28884b15..e79d2b6f857 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-059.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-059.md @@ -106,6 +106,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -114,6 +115,7 @@ const evalFormula = x => { return fn; }; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-060.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-060.md index 9241625b178..3d6a5a955b7 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-060.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-060.md @@ -108,6 +108,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -117,6 +118,7 @@ const evalFormula = x => { }; const fn = elemValue("1"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-061.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-061.md index ebe10aa851c..994e931f57f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-061.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-061.md @@ -110,6 +110,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -120,6 +121,7 @@ const evalFormula = x => { const fn = elemValue("1"); return fn("A"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-062.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-062.md index b9dfb010cd5..b06f86f5495 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-062.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-062.md @@ -108,6 +108,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -117,6 +118,7 @@ const evalFormula = x => { const fn = elemValue("1"); return fn("A"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-063.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-063.md index fbaf60e87a7..d1492aa5cbf 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-063.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-063.md @@ -108,6 +108,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -115,6 +116,7 @@ const evalFormula = x => { const fn = elemValue("1"); return fn("A"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-064.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-064.md index 76c4337f252..8d17549a291 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-064.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-064.md @@ -106,6 +106,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -114,6 +115,7 @@ const evalFormula = x => { const fn = elemValue("1"); return fn("A"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-065.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-065.md index bc429581127..1c388711e2f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-065.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-065.md @@ -110,6 +110,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -118,6 +119,7 @@ const evalFormula = x => { const fn = elemValue("1"); return fn("A"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-066.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-066.md index d5c45eb00c5..45e6af501cc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-066.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-066.md @@ -106,6 +106,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -114,6 +115,7 @@ const evalFormula = x => { const fn = elemValue("1"); return fn("A"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-067.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-067.md index c27bafcbec0..19bbc068cd3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-067.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-067.md @@ -116,6 +116,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -124,6 +125,7 @@ const evalFormula = x => { const fn = elemValue("1"); return fn("A"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-068.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-068.md index 43b2a707340..e220cf656e5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-068.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-068.md @@ -110,6 +110,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -118,6 +119,7 @@ const evalFormula = x => { const fn = elemValue("1"); return fn("A"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-069.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-069.md index fc4da1fea3a..eaff17e3511 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-069.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-069.md @@ -108,6 +108,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -116,6 +117,7 @@ const evalFormula = x => { const fn = elemValue("1"); return fn("A"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-070.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-070.md index 64235330d9b..03ec1f65ba2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-070.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-070.md @@ -110,6 +110,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -118,6 +119,7 @@ const evalFormula = x => { const varRangeExpanded = x.replace(rangeRegex, ""); return varRangeExpanded; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-071.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-071.md index 75f967b2bc1..b1139d99d92 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-071.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-071.md @@ -110,6 +110,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -120,6 +121,7 @@ const evalFormula = x => { ); return varRangeExpanded; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-072.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-072.md index 67061764270..a481e918c67 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-072.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-072.md @@ -112,6 +112,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -122,6 +123,7 @@ const evalFormula = x => { ); return varRangeExpanded; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-073.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-073.md index ed74ae0d69b..64e48966f02 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-073.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-073.md @@ -108,6 +108,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -118,6 +119,7 @@ const evalFormula = x => { ); return varRangeExpanded; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-074.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-074.md index 9bf1af734fe..57da365160d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-074.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-074.md @@ -108,6 +108,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -118,6 +119,7 @@ const evalFormula = x => { ); return varRangeExpanded; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-075.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-075.md index 8d174ebda3a..2dc9ec5c8ab 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-075.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-075.md @@ -110,6 +110,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -122,6 +123,7 @@ const evalFormula = x => { const varExpanded = varRangeExpanded.replace(varRegex, ""); return varExpanded; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-076.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-076.md index b4ec84d0983..0516f1f77e6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-076.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-076.md @@ -104,6 +104,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -119,6 +120,7 @@ const evalFormula = x => { ); return varExpanded; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-077.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-077.md index cec5c452105..a1022f45c6a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-077.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-077.md @@ -106,6 +106,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -122,6 +123,7 @@ const evalFormula = x => { const functionExpanded = applyFn(varExpanded); return functionExpanded; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-078.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-078.md index a1ed6f267ed..5617221e798 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-078.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-078.md @@ -129,7 +129,9 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-079.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-079.md index 99fc2eab600..06b401c7e8e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-079.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-079.md @@ -127,7 +127,9 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-080.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-080.md index fde11b78b6b..59443f50dc9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-080.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-080.md @@ -127,10 +127,12 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const letters = charRange("A", "J"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-081.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-081.md index bc1aa82c445..3a3a6f126c8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-081.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-081.md @@ -127,6 +127,7 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const createLabel = name => { @@ -134,6 +135,7 @@ window.onload = () => { }; const letters = charRange("A", "J"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-082.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-082.md index a3df1c553de..a9a1dcc5726 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-082.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-082.md @@ -133,6 +133,7 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const createLabel = name => { @@ -140,6 +141,7 @@ window.onload = () => { }; const letters = charRange("A", "J"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-083.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-083.md index 26e46c2878c..780a9dab7fe 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-083.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-083.md @@ -125,6 +125,7 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const createLabel = name => { @@ -135,6 +136,7 @@ window.onload = () => { }; const letters = charRange("A", "J"); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-084.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-084.md index 34669dffccd..ccfac003142 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-084.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-084.md @@ -123,6 +123,7 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const createLabel = name => { @@ -134,6 +135,7 @@ window.onload = () => { const letters = charRange("A", "J"); letters.forEach(createLabel); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-085.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-085.md index fd72df15dd4..5216d89d1d9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-085.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-085.md @@ -127,6 +127,7 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const createLabel = name => { @@ -139,6 +140,7 @@ window.onload = () => { letters.forEach(createLabel); range(1, 99); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-086.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-086.md index e060befc16b..544000db907 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-086.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-086.md @@ -127,6 +127,7 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const createLabel = name => { @@ -139,6 +140,7 @@ window.onload = () => { letters.forEach(createLabel); range(1, 99).forEach(createLabel); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-087.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-087.md index 37097ee823c..bf8bee8395a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-087.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-087.md @@ -127,6 +127,7 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const createLabel = name => { @@ -141,6 +142,7 @@ window.onload = () => { createLabel(x); }); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-088.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-088.md index 24b1c85aa15..d57aa617713 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-088.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-088.md @@ -127,6 +127,7 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const createLabel = name => { @@ -144,7 +145,7 @@ window.onload = () => { }); }); }; - +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-089.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-089.md index b580f6d81da..4568ec50b24 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-089.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-089.md @@ -134,6 +134,7 @@ const evalFormula = x => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const createLabel = name => { @@ -151,6 +152,7 @@ window.onload = () => { }); }); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-090.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-090.md index 4b4bd9a3542..6543d3124fb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-090.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-090.md @@ -148,8 +148,9 @@ window.onload = () => { }); }); }; +--fcc-editable-region-- - +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-091.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-091.md index 88170b3d70e..378c01975ac 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-091.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-091.md @@ -149,9 +149,11 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { const element = event.target; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-092.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-092.md index 33de7a0ac09..93968d4e378 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-092.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-092.md @@ -151,10 +151,12 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { const element = event.target; const value = element.value.replace(/\s/g, ""); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-093.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-093.md index 78d77f353ff..dcc989ea328 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-093.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-093.md @@ -149,11 +149,13 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { const element = event.target; const value = element.value.replace(/\s/g, ""); if (!value.includes(element.id)) {} }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-094.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-094.md index 96aa8385b86..ce97294c369 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-094.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-094.md @@ -147,11 +147,13 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { const element = event.target; const value = element.value.replace(/\s/g, ""); if (!value.includes(element.id) && value[0] === "=") {} }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-095.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-095.md index 73c51a143e3..1eaf868ad16 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-095.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-095.md @@ -147,6 +147,7 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { const element = event.target; const value = element.value.replace(/\s/g, ""); @@ -154,6 +155,7 @@ const update = event => { console.log(value.slice(0, 2)); } }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-096.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-096.md index 3b8fda0fd55..cd6f2405a86 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-096.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-096.md @@ -149,6 +149,7 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { const element = event.target; const value = element.value.replace(/\s/g, ""); @@ -156,6 +157,7 @@ const update = event => { console.log(value.slice(1)); } }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-097.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-097.md index 376ff4df094..fb91f29be96 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-097.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-097.md @@ -87,9 +87,11 @@ const highPrecedence = str => { return str === str2 ? str : highPrecedence(str2); }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-098.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-098.md index 873138bf439..c933b24aaac 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-098.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-098.md @@ -81,10 +81,12 @@ const highPrecedence = str => { return str === str2 ? str : highPrecedence(str2); }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => x }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-099.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-099.md index ab7a997ab2c..2a5ee766e3d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-099.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-099.md @@ -166,7 +166,9 @@ const update = event => { } }; +--fcc-editable-region-- +--fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-100.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-100.md index 21632d6a970..2f419cf2876 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-100.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-100.md @@ -152,6 +152,7 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { const element = event.target; const value = element.value.replace(/\s/g, ""); @@ -159,6 +160,7 @@ const update = event => { element.value = evalFormula(value.slice(1)); } }; +--fcc-editable-region-- // console.log(spreadsheetFunctions["random"](1, 1000) === spreadsheetFunctions["random"](1, 1000)) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-101.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-101.md index 456fdf7b032..176257a88b5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-101.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-101.md @@ -150,6 +150,7 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { // window.onload(); const element = event.target; @@ -158,6 +159,7 @@ const update = event => { element.value = evalFormula(value.slice(1)); } }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-102.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-102.md index 0689327cf35..ad427105522 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-102.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-102.md @@ -152,6 +152,7 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { // highPrecedence("2*2"); const element = event.target; @@ -160,6 +161,7 @@ const update = event => { element.value = evalFormula(value.slice(1)); } }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-103.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-103.md index b58e8499348..231159b2b34 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-103.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-103.md @@ -148,6 +148,7 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { console.log(highPrecedence("2*2") === highPrecedence("2*2")); const element = event.target; @@ -156,6 +157,7 @@ const update = event => { element.value = evalFormula(value.slice(1)); } }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-104.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-104.md index 54223c093b8..36fd2f83b90 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-104.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-104.md @@ -110,6 +110,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -128,6 +129,7 @@ const evalFormula = x => { ? functionExpanded : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-105.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-105.md index 98e4e37e01e..4b9e711aae6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-105.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-105.md @@ -107,6 +107,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = x => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -125,6 +126,7 @@ const evalFormula = x => { ? functionExpanded : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-106.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-106.md index fc0177c41e9..39584a049ae 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-106.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-106.md @@ -152,6 +152,7 @@ window.onload = () => { }); }; +--fcc-editable-region-- const update = event => { const element = event.target; const value = element.value.replace(/\s/g, ""); @@ -159,6 +160,7 @@ const update = event => { element.value = evalFormula(value.slice(1)); } }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-107.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-107.md index 53334390738..1ab52bf8124 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-107.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-107.md @@ -105,6 +105,7 @@ const charRange = (start, end) => String.fromCharCode(x) ); +--fcc-editable-region-- const evalFormula = (x, cells) => { const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); @@ -124,6 +125,7 @@ const evalFormula = (x, cells) => { : evalFormula(functionExpanded); }; +--fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-108.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-108.md index b375fce4190..11e0b2d0bbc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-108.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-108.md @@ -106,7 +106,9 @@ const charRange = (start, end) => ); const evalFormula = (x, cells) => { +--fcc-editable-region-- +--fcc-editable-region-- const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); const elemValue = n => c => "" diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-109.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-109.md index 8b37349d79d..d4c961be237 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-109.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-109.md @@ -112,7 +112,9 @@ const charRange = (start, end) => ); const evalFormula = (x, cells) => { +--fcc-editable-region-- const idToText = id => cells; +--fcc-editable-region-- const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-110.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-110.md index 9a2e4c945c3..abdc6794679 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-110.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-110.md @@ -110,7 +110,9 @@ const charRange = (start, end) => ); const evalFormula = (x, cells) => { +--fcc-editable-region-- const idToText = id => cells.find(cell => cell === id); +--fcc-editable-region-- const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); const elemValue = n => c => "" diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-111.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-111.md index 9136d270698..4baca0e6cc3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-111.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-111.md @@ -110,7 +110,9 @@ const charRange = (start, end) => ); const evalFormula = (x, cells) => { +--fcc-editable-region-- const idToText = id => cells.find(cell => cell.id === id); +--fcc-editable-region-- const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); const elemValue = n => c => "" diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-112.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-112.md index f9ff4444c98..a2c5b9b1bef 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-112.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-112.md @@ -109,7 +109,9 @@ const evalFormula = (x, cells) => { const idToText = id => cells.find(cell => cell.id === id).value; const rangeRegex = /([A-J])([1-9][0-9]?):([A-J])([1-9][0-9]?)/gi; const rangeFromString = (n1, n2) => range(parseInt(n1), parseInt(n2)); +--fcc-editable-region-- const elemValue = n => c => "" +--fcc-editable-region-- const addChars = c1 => c2 => n => charRange(c1, c2).map(elemValue(n)); const varRangeExpanded = x.replace(rangeRegex, (_, c1, n1, c2, n2) => rangeFromString(n1, n2).map(addChars(c1)(c2)) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-113.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-113.md index b2517f72eb9..637af181723 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-113.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-113.md @@ -117,10 +117,12 @@ const evalFormula = (x, cells) => { rangeFromString(n1, n2).map(addChars(c1)(c2)) ); const varRegex = /[A-J][1-9][0-9]?/gi; +--fcc-editable-region-- const varExpanded = varRangeExpanded.replace( varRegex, match => "" ); +--fcc-editable-region-- const functionExpanded = applyFn(varExpanded); return functionExpanded === x diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-114.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-114.md index db61c0941aa..d12140aa462 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-114.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-114.md @@ -79,10 +79,12 @@ const highPrecedence = str => { return str === str2 ? str : highPrecedence(str2); }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x) }; +--fcc-editable-region-- const applyFn = str => { const noHigh = highPrecedence(str); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-115.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-115.md index 2abd01c55fc..c966a9161ed 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-115.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-115.md @@ -81,11 +81,13 @@ const highPrecedence = str => { return str === str2 ? str : highPrecedence(str2); }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), increment: nums => nums.map(x => x + 1) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-116.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-116.md index 2918340f31d..5483ee8a3e9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-116.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-116.md @@ -85,12 +85,14 @@ const highPrecedence = str => { return str === str2 ? str : highPrecedence(str2); }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), increment: nums => nums.map(x => x + 1), firsttwo: arr => arr.slice(0, 2) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-117.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-117.md index d2948614d4d..3e61d996f85 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-117.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-117.md @@ -84,7 +84,9 @@ const highPrecedence = str => { const str2 = infixEval(str, regex); return str === str2 ? str : highPrecedence(str2); }; +--fcc-editable-region-- +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-118.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-118.md index f8929ce339c..8c4b6a9e314 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-118.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-118.md @@ -88,6 +88,7 @@ const highPrecedence = str => { const isEven = num => num % 2 === 0; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), @@ -95,6 +96,7 @@ const spreadsheetFunctions = { firsttwo: arr => arr.slice(0, 2), lasttwo: arr => arr.slice(-2) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-119.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-119.md index 97a6be5ef9d..c441a9459d8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-119.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-119.md @@ -91,6 +91,7 @@ const highPrecedence = str => { const isEven = num => num % 2 === 0; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), @@ -99,6 +100,7 @@ const spreadsheetFunctions = { lasttwo: arr => arr.slice(-2), even: nums => nums.filter(isEven) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-120.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-120.md index 41dd0fed650..787472aea1d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-120.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-120.md @@ -83,6 +83,7 @@ const highPrecedence = str => { const isEven = num => num % 2 === 0; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), @@ -92,6 +93,7 @@ const spreadsheetFunctions = { even: nums => nums.filter(isEven), sum: nums => nums.reduce((a, x) => a + x) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-121.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-121.md index 28fec42a1d2..f032db3ac16 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-121.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-121.md @@ -91,6 +91,7 @@ const highPrecedence = str => { const isEven = num => num % 2 === 0; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), @@ -101,6 +102,7 @@ const spreadsheetFunctions = { sum: nums => nums.reduce((a, x) => a + x), has2: arr => arr.includes(2) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-122.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-122.md index dc00ccf4e4a..6b5714247b5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-122.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-122.md @@ -82,6 +82,7 @@ const highPrecedence = str => { const isEven = num => num % 2 === 0; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), @@ -93,6 +94,7 @@ const spreadsheetFunctions = { has2: arr => arr.includes(2), nodups: arr => arr.reduce((a, x) => a.includes(x), []) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-123.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-123.md index 7b9224fb8d6..8f15f9adfd4 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-123.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-123.md @@ -86,6 +86,7 @@ const highPrecedence = str => { }; const isEven = num => num % 2 === 0; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, @@ -98,6 +99,7 @@ const spreadsheetFunctions = { has2: arr => arr.includes(2), nodups: arr => arr.reduce((a, x) => a.includes(x) ? a : a.concat(x), []) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-124.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-124.md index 73e8f892882..eef96f2d471 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-124.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-124.md @@ -82,6 +82,7 @@ const highPrecedence = str => { const isEven = num => num % 2 === 0; const sum = nums => nums.reduce((a, x) => a + x); +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), @@ -92,6 +93,7 @@ const spreadsheetFunctions = { has2: arr => arr.includes(2), nodups: arr => arr.reduce((a, x) => a.includes(x) ? a : a.concat(x), []) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-125.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-125.md index 326042ff90b..cb3b30d8c4f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-125.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-125.md @@ -82,6 +82,7 @@ const highPrecedence = str => { }; const isEven = num => num % 2 === 0; +--fcc-editable-region-- const sum = nums => nums.reduce((a, x) => a + x); const spreadsheetFunctions = { @@ -95,6 +96,7 @@ const spreadsheetFunctions = { has2: arr => arr.includes(2), nodups: arr => arr.reduce((a, x) => a.includes(x) ? a : a.concat(x), []) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-126.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-126.md index 6565a565de3..621e4cc4fbc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-126.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-126.md @@ -92,6 +92,7 @@ const isEven = num => num % 2 === 0; const sum = nums => nums.reduce((a, x) => a + x); const average = nums => sum(nums) / nums.length; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), @@ -104,6 +105,7 @@ const spreadsheetFunctions = { has2: arr => arr.includes(2), nodups: arr => arr.reduce((a, x) => a.includes(x) ? a : a.concat(x), []) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-127.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-127.md index f0911314b97..8d27ee2bf76 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-127.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-127.md @@ -80,7 +80,9 @@ const highPrecedence = str => { const isEven = num => num % 2 === 0; const sum = nums => nums.reduce((a, x) => a + x); const average = nums => sum(nums) / nums.length; +--fcc-editable-region-- +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-128.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-128.md index 2e3f7b143a1..08ffbd94e4a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-128.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-128.md @@ -89,7 +89,9 @@ const isEven = num => num % 2 === 0; const sum = nums => nums.reduce((a, x) => a + x); const average = nums => sum(nums) / nums.length; +--fcc-editable-region-- const median = nums => {}; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-129.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-129.md index 53dd43a54df..49b025f4b1e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-129.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-129.md @@ -93,9 +93,11 @@ const isEven = num => num % 2 === 0; const sum = nums => nums.reduce((a, x) => a + x); const average = nums => sum(nums) / nums.length; +--fcc-editable-region-- const median = nums => { const sorted = nums.sort(); }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-130.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-130.md index ec131415524..cad2f5aa466 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-130.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-130.md @@ -87,9 +87,11 @@ const isEven = num => num % 2 === 0; const sum = nums => nums.reduce((a, x) => a + x); const average = nums => sum(nums) / nums.length; +--fcc-editable-region-- const median = nums => { const sorted = nums.sort((x, y) => x - y); }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-131.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-131.md index 2b72acbdabd..df39b579f78 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-131.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-131.md @@ -85,9 +85,11 @@ const isEven = num => num % 2 === 0; const sum = nums => nums.reduce((a, x) => a + x); const average = nums => sum(nums) / nums.length; +--fcc-editable-region-- const median = nums => { const sorted = nums.slice().sort((x, y) => x - y); }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-132.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-132.md index ad2c6693699..1e4f1aca372 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-132.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-132.md @@ -81,11 +81,13 @@ const isEven = num => num % 2 === 0; const sum = nums => nums.reduce((a, x) => a + x); const average = nums => sum(nums) / nums.length; +--fcc-editable-region-- const median = nums => { const sorted = nums.slice().sort((x, y) => x - y); const length = sorted.length; const middle = sorted.length / 2 - 1; }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-133.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-133.md index be42edb6eaa..4cf66a6dd6a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-133.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-133.md @@ -83,12 +83,14 @@ const isEven = num => num % 2 === 0; const sum = nums => nums.reduce((a, x) => a + x); const average = nums => sum(nums) / nums.length; +--fcc-editable-region-- const median = nums => { const sorted = nums.slice().sort((x, y) => x - y); const length = sorted.length; const middle = sorted.length / 2 - 1; return isEven(length); }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-134.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-134.md index 09507ec0674..2428ff3a79d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-134.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-134.md @@ -93,6 +93,7 @@ const median = nums => { : sorted[middle + 0.5]; }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), @@ -106,6 +107,7 @@ const spreadsheetFunctions = { nodups: arr => arr.reduce((a, x) => a.includes(x) ? a : a.concat(x), []), range: arr => range(...arr) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-135.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-135.md index a837859f960..ff91ae909fd 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-135.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-135.md @@ -96,6 +96,7 @@ const median = nums => { : sorted[middle + 0.5]; }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), @@ -110,6 +111,7 @@ const spreadsheetFunctions = { nodups: arr => arr.reduce((a, x) => a.includes(x) ? a : a.concat(x), []), range: arr => range(...arr) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-136.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-136.md index a7fa4cb7a46..ddede0016d6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-136.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-136.md @@ -96,6 +96,7 @@ const median = nums => { : sorted[middle + 0.5]; }; +--fcc-editable-region-- const spreadsheetFunctions = { "": x => x, random: ([x, y]) => Math.floor(Math.random() * y + x), @@ -111,6 +112,7 @@ const spreadsheetFunctions = { range: arr => range(...arr), someeven: arr => arr.some(isEven) }; +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-137.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-137.md index d8697d4b111..c475cf8ba22 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-137.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-137.md @@ -128,8 +128,10 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => start > end ? [] : [start].concat(range(start + 1, end)); +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-138.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-138.md index 0c1547c2f4c..52e294c3655 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-138.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-138.md @@ -126,7 +126,9 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => start +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-139.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-139.md index d124cc81eca..ce1e1c87c73 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-139.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-139.md @@ -128,7 +128,9 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => Array(end - start + 1); +--fcc-editable-region-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-140.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-140.md index 4c3ad2c702f..9630c3210b7 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-140.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/step-140.md @@ -132,7 +132,9 @@ const applyFn = str => { ); }; +--fcc-editable-region-- const range = (start, end) => Array(end - start + 1).fill(start); +--fcc-editable-region--