diff --git a/curriculum/challenges/_meta/learn-basic-javascript-by-building-a-role-playing-game/meta.json b/curriculum/challenges/_meta/learn-basic-javascript-by-building-a-role-playing-game/meta.json index 027f562e1d237f..f398884f1d303b 100644 --- a/curriculum/challenges/_meta/learn-basic-javascript-by-building-a-role-playing-game/meta.json +++ b/curriculum/challenges/_meta/learn-basic-javascript-by-building-a-role-playing-game/meta.json @@ -36,697 +36,669 @@ "id": "62a3a0a3c0a4b32915d26a6e", "title": "Step 6" }, - { - "id": "62a3a488b24fb32b91155d56", - "title": "Step 7" - }, { "id": "62a3a75d8466a12e009eff76", - "title": "Step 8" + "title": "Step 7" }, { "id": "62a3a7e4f1060e2fc5ffb34b", - "title": "Step 9" + "title": "Step 8" }, { "id": "62a3b3eab50e193608c19fc6", - "title": "Step 10" + "title": "Step 9" }, { "id": "62a3b41c9494f937560640ab", - "title": "Step 11" - }, - { - "id": "62a3b49686792938718b90d3", - "title": "Step 12" - }, - { - "id": "62a3b506dbaead396f58a701", - "title": "Step 13" - }, - { - "id": "62a3b5843544ce3a77459c27", - "title": "Step 14" + "title": "Step 10" }, { "id": "62a115879a6d51422652cbfc", - "title": "Step 15" + "title": "Step 11" }, { "id": "62a1166ed9a56d439c0770e7", - "title": "Step 16" + "title": "Step 12" }, { "id": "62a23c1d505bfa13747c8a9b", - "title": "Step 17" + "title": "Step 13" }, { "id": "62a23cb9bc467a147516b500", - "title": "Step 18" + "title": "Step 14" }, { "id": "62a3b79d520a7f3d0e25afd6", - "title": "Step 19" + "title": "Step 15" }, { "id": "62b46e3a8d4be31be5af793d", - "title": "Step 20" + "title": "Step 16" }, { "id": "62a3bb9aeefe4b3fc43c6d7b", - "title": "Step 21" + "title": "Step 17" }, { "id": "62fc20387ef88d1d1998aac5", - "title": "Step 22" + "title": "Step 18" }, { "id": "62a23d1c5f1c93161f3582ae", - "title": "Step 23" + "title": "Step 19" }, { "id": "62a2401b9842721796b72850", - "title": "Step 24" + "title": "Step 20" }, { "id": "62a24068d60b671847d1d4e2", - "title": "Step 25" + "title": "Step 21" }, { "id": "62a2409897ec621942234cf6", - "title": "Step 26" + "title": "Step 22" }, { "id": "62a240c67f3dbb1a1e6d95ee", - "title": "Step 27" + "title": "Step 23" }, { "id": "62a24128d5e8af1b47ad1aab", - "title": "Step 28" + "title": "Step 24" }, { "id": "62fc1ee0c5a89717d4785729", - "title": "Step 29" + "title": "Step 25" }, { "id": "62a24190868ca51c0b6e83c7", - "title": "Step 30" + "title": "Step 26" }, { "id": "62a241df03c1f61ce936f5d9", - "title": "Step 31" + "title": "Step 27" }, { "id": "6577ea4f23e3ba1217007bc7", - "title": "Step 32" + "title": "Step 28" }, { "id": "62a3bec30ea7f941412512dc", - "title": "Step 33" + "title": "Step 29" }, { "id": "62fc211760bfc220f4734800", - "title": "Step 34" + "title": "Step 30" }, { "id": "62a3c668afc43b4a134cca81", - "title": "Step 35" + "title": "Step 31" }, { "id": "62a3c8bf3980c14c438d2aed", - "title": "Step 36" + "title": "Step 32" }, { "id": "62a3c91a2bab1b4d6fabb726", - "title": "Step 37" + "title": "Step 33" }, { "id": "62a3cdb11478a34ff4a6470d", - "title": "Step 38" + "title": "Step 34" }, { "id": "62a3c0ab883fd9435cd5c518", - "title": "Step 39" + "title": "Step 35" }, { "id": "62a3c2fccf186146b59c6e96", - "title": "Step 40" + "title": "Step 36" }, { "id": "62a3c4a0e52767482c5202d4", - "title": "Step 41" + "title": "Step 37" }, { "id": "62a3cfc8328d3351b95d4f61", - "title": "Step 42" + "title": "Step 38" }, { "id": "62a7beb1ad61211ac153707f", - "title": "Step 43" + "title": "Step 39" }, { "id": "62a7bf06d2ad9d1c5024e833", - "title": "Step 44" + "title": "Step 40" }, { "id": "62a7bfabe119461eb13ccbd6", - "title": "Step 45" + "title": "Step 41" }, { "id": "62a7bfd9179b7f1f6a15fb1e", - "title": "Step 46" + "title": "Step 42" }, { "id": "62a7c011eef9fb2084b966db", - "title": "Step 47" + "title": "Step 43" }, { "id": "62a7c071219da921758a35bb", - "title": "Step 48" + "title": "Step 44" }, { "id": "62a7c23e6b511f22ed71197a", - "title": "Step 49" + "title": "Step 45" }, { "id": "62a7cc99577fbf25ee7a7d76", - "title": "Step 50" + "title": "Step 46" }, { "id": "62a8a929e4260d08093756d2", - "title": "Step 51" + "title": "Step 47" }, { "id": "660880e67dfed9eb6adb7178", - "title": "Step 52" + "title": "Step 48" }, { "id": "66088382bd1422ed8b5309c3", - "title": "Step 53" + "title": "Step 49" }, { "id": "6608b8713915f21398ff32e1", - "title": "Step 54" + "title": "Step 50" }, { "id": "66088621742011f008175e5e", - "title": "Step 55" + "title": "Step 51" }, { "id": "6608b7985f4ba5127cbc401b", - "title": "Step 56" + "title": "Step 52" }, { "id": "6608bee87c43ca194effebdf", - "title": "Step 57" + "title": "Step 53" }, { "id": "62a8a9d876b2580943ba9351", - "title": "Step 58" + "title": "Step 54" }, { "id": "62a8ab0e27cbaf0b54ba8a42", - "title": "Step 59" + "title": "Step 55" }, { "id": "62a8ac194679e60cb561b0a8", - "title": "Step 60" + "title": "Step 56" }, { "id": "62a8ad8e01d7cb0deae5ec66", - "title": "Step 61" + "title": "Step 57" }, { "id": "62a8ade9b2f5b30ef0b606c2", - "title": "Step 62" + "title": "Step 58" }, { "id": "62a8ae85fcaedc0fddc7ca4f", - "title": "Step 63" + "title": "Step 59" }, { "id": "62a8b0b5053f16111b0b6b5f", - "title": "Step 64" + "title": "Step 60" }, { "id": "62a8b1762b7775124622e1a3", - "title": "Step 65" + "title": "Step 61" }, { "id": "62a8b3cc436db8139cc5fc09", - "title": "Step 66" + "title": "Step 62" }, { "id": "62a8b6536156c51500739b41", - "title": "Step 67" + "title": "Step 63" }, { "id": "62a8b711ab7a12161c7d9b67", - "title": "Step 68" + "title": "Step 64" }, { "id": "62a8b9770050d217d2247801", - "title": "Step 69" + "title": "Step 65" }, { "id": "62a8c0c8313e891a15ec23e7", - "title": "Step 70" + "title": "Step 66" }, { "id": "62a8c1154d3ae11aee80353f", - "title": "Step 71" + "title": "Step 67" }, { "id": "62a8c151b23bf21bc7c4fcba", - "title": "Step 72" + "title": "Step 68" }, { "id": "62a8c173949f851c83c64756", - "title": "Step 73" + "title": "Step 69" }, { "id": "62a8c242b25a531f2909e5bc", - "title": "Step 74" + "title": "Step 70" }, { "id": "62a8c2bbbd8aa82052f47c53", - "title": "Step 75" + "title": "Step 71" }, { "id": "62a8c31ec0ec78216a1c36a0", - "title": "Step 76" + "title": "Step 72" }, { "id": "62a8c370ad8c68227137e0bc", - "title": "Step 77" + "title": "Step 73" }, { "id": "62a8c3ebc6c35e23785e1a19", - "title": "Step 78" + "title": "Step 74" }, { "id": "62a8c41ecaf1bd24536129b8", - "title": "Step 79" + "title": "Step 75" }, { "id": "62a8c465fa7b0c252f4a8f0c", - "title": "Step 80" + "title": "Step 76" }, { "id": "62a8c4db0710f3260f867a92", - "title": "Step 81" + "title": "Step 77" }, { "id": "62a8c5db7888af27af23f0dd", - "title": "Step 82" + "title": "Step 78" }, { "id": "62a8c65b75664c28a8e59c16", - "title": "Step 83" + "title": "Step 79" }, { "id": "62a8c6815f5f1a29735efe1b", - "title": "Step 84" + "title": "Step 80" }, { "id": "62a8c7322e42962ad53ad204", - "title": "Step 85" + "title": "Step 81" }, { "id": "62a8c7a59e72c02bb1c717d2", - "title": "Step 86" + "title": "Step 82" }, { "id": "62a8c89e4272512d44fc1c66", - "title": "Step 87" + "title": "Step 83" }, { "id": "62a8c8cee8e5cf2e001789b4", - "title": "Step 88" + "title": "Step 84" }, { "id": "62a8ca22d29fe62f3952bdf5", - "title": "Step 89" + "title": "Step 85" }, { "id": "62a8cb19bd7f8a304e5427a1", - "title": "Step 90" + "title": "Step 86" }, { "id": "62a8cbd1e3595431d5a2b3f1", - "title": "Step 91" + "title": "Step 87" }, { "id": "62a8cce1b0c32c33017cf2e9", - "title": "Step 92" + "title": "Step 88" }, { "id": "62a8ce1dfc990134162b3bd9", - "title": "Step 93" + "title": "Step 89" }, { "id": "62a8ce73d0dce43468f6689c", - "title": "Step 94" + "title": "Step 90" }, { "id": "62a8cf22272d6d35af80d4ac", - "title": "Step 95" + "title": "Step 91" }, { "id": "62a8d0337d7c67377a4a76c6", - "title": "Step 96" + "title": "Step 92" }, { "id": "62a8d08668fa8b38732486e9", - "title": "Step 97" + "title": "Step 93" }, { "id": "62a8d0c4f12c2239b6618582", - "title": "Step 98" + "title": "Step 94" }, { "id": "62a8d0fdf2dad83a92883a80", - "title": "Step 99" + "title": "Step 95" }, { "id": "62a8d143f2a58e3b6d6e9c33", - "title": "Step 100" + "title": "Step 96" }, { "id": "62a8d1c72e8bb13c2074d93c", - "title": "Step 101" + "title": "Step 97" }, { "id": "62a8d2146a3e853d0a6e28ca", - "title": "Step 102" + "title": "Step 98" }, { "id": "62a8d24c97461b3ddb9397c8", - "title": "Step 103" + "title": "Step 99" }, { "id": "62a8d2e2a073be3edb46116f", - "title": "Step 104" + "title": "Step 100" }, { "id": "62a8d31ebbc10e3fe1b28e03", - "title": "Step 105" + "title": "Step 101" }, { "id": "62a8d35660db4040ba292193", - "title": "Step 106" + "title": "Step 102" }, { "id": "62a8d382cd075f4169223e14", - "title": "Step 107" + "title": "Step 103" }, { "id": "62a8d539dc11cb42b5dd7ec8", - "title": "Step 108" + "title": "Step 104" }, { "id": "62a8d61ddfe35744369365b7", - "title": "Step 109" + "title": "Step 105" }, { "id": "62a8d6c7001ebc45350e3d16", - "title": "Step 110" + "title": "Step 106" }, { "id": "62a8d7b8ab568b4649998954", - "title": "Step 111" + "title": "Step 107" }, { "id": "62a8d81f539f004776dd9b1e", - "title": "Step 112" + "title": "Step 108" }, { "id": "62a8dd468debb449b4454086", - "title": "Step 113" + "title": "Step 109" }, { "id": "62a8dd9cdb16324b04cfd958", - "title": "Step 114" + "title": "Step 110" }, { "id": "62a8dfcf7fb1044d2f478fd1", - "title": "Step 115" + "title": "Step 111" }, { "id": "62a8e0d1d0110b4ec421489f", - "title": "Step 116" + "title": "Step 112" }, { "id": "62a8e142f7f0bd4fed898de3", - "title": "Step 117" + "title": "Step 113" }, { "id": "62a8e1dc897df55108bcb5e8", - "title": "Step 118" + "title": "Step 114" }, { "id": "62a8e21398ad61520edb724f", - "title": "Step 119" + "title": "Step 115" }, { "id": "62a8e24c673b075317cc0b09", - "title": "Step 120" + "title": "Step 116" }, { "id": "62a8e271f8e3d1541f9624ad", - "title": "Step 121" + "title": "Step 117" }, { "id": "62a8e35675c18c56354c08cf", - "title": "Step 122" + "title": "Step 118" }, { "id": "62a8e41e2f190c58404dd46e", - "title": "Step 123" + "title": "Step 119" }, { "id": "62a8e45cc600c3591cee671a", - "title": "Step 124" + "title": "Step 120" }, { "id": "62a8e49f4df7af5ae2d7a616", - "title": "Step 125" + "title": "Step 121" }, { "id": "62a8e4dc6a60f85bf256a0cb", - "title": "Step 126" + "title": "Step 122" }, { "id": "62a8ed36d7a7915dfa444ba2", - "title": "Step 127" + "title": "Step 123" }, { "id": "62a8edd05e27cc668051686f", - "title": "Step 128" + "title": "Step 124" }, { "id": "62a8ee154c8946678775c4a4", - "title": "Step 129" + "title": "Step 125" }, { "id": "62a8ee71f018e968a056d369", - "title": "Step 130" + "title": "Step 126" }, { "id": "62a8eec45f77bc69e8775294", - "title": "Step 131" + "title": "Step 127" }, { "id": "62a8eefe2e68b66ac563816b", - "title": "Step 132" + "title": "Step 128" }, { "id": "62a8ef6a52292f6bdca4f6f8", - "title": "Step 133" + "title": "Step 129" }, { "id": "62a8ef8f0c76a46cd221a68c", - "title": "Step 134" + "title": "Step 130" }, { "id": "62a8efb0e3ce826db8daf80f", - "title": "Step 135" + "title": "Step 131" }, { "id": "62a8eff21c0b0f6ebe5b8e38", - "title": "Step 136" + "title": "Step 132" }, { "id": "62a8f06fb318666fef69f91e", - "title": "Step 137" + "title": "Step 133" }, { "id": "62a8f14fe6d1fc72454648c7", - "title": "Step 138" + "title": "Step 134" }, { "id": "62a8f1d5f5ddbf74c07f733b", - "title": "Step 139" + "title": "Step 135" }, { "id": "62a8f20463b324759953edad", - "title": "Step 140" + "title": "Step 136" }, { "id": "62ba17beef16c563069a65d8", - "title": "Step 141" + "title": "Step 137" }, { "id": "62a8f256b813a476cae51f49", - "title": "Step 142" + "title": "Step 138" }, { "id": "65b2f6acce65b7a69751a090", - "title": "Step 143" + "title": "Step 139" }, { "id": "62a8f35bde1750791f58773f", - "title": "Step 144" + "title": "Step 140" }, { "id": "62a94114ce0b8918b487390f", - "title": "Step 145" + "title": "Step 141" }, { "id": "62aa1cea594f152ba626b872", - "title": "Step 146" + "title": "Step 142" }, { "id": "62aa1d6736ba262cfa74344b", - "title": "Step 147" + "title": "Step 143" }, { "id": "62aa1d9f535e102e4663e7a6", - "title": "Step 148" + "title": "Step 144" }, { "id": "62aa1e3c7c3d552fb04f0f18", - "title": "Step 149" + "title": "Step 145" }, { "id": "62aa1e8ccd579330e097ce44", - "title": "Step 150" + "title": "Step 146" }, { "id": "62aa1eec891ed731db227a36", - "title": "Step 151" + "title": "Step 147" }, { "id": "62aa1fed3d4e873366ff3131", - "title": "Step 152" + "title": "Step 148" }, { "id": "62aa204c1e1d33348ff09944", - "title": "Step 153" + "title": "Step 149" }, { "id": "62aa20e9cf1be9358f5aceae", - "title": "Step 154" + "title": "Step 150" }, { "id": "62aa2136fc49b836dfedb959", - "title": "Step 155" + "title": "Step 151" }, { "id": "62aa21971e3b743844849985", - "title": "Step 156" + "title": "Step 152" }, { "id": "62aa21ea8d9d9f396b95dd87", - "title": "Step 157" + "title": "Step 153" }, { "id": "62aa226207f33d3ad4c6f546", - "title": "Step 158" + "title": "Step 154" }, { "id": "62aa22aba186563bcbf2c395", - "title": "Step 159" + "title": "Step 155" }, { "id": "62aa234322d4ad3e8bce42cc", - "title": "Step 160" + "title": "Step 156" }, { "id": "62aa2469c77b363fdb4f0e06", - "title": "Step 161" + "title": "Step 157" }, { "id": "62aa252c3b1073415ba2b898", - "title": "Step 162" + "title": "Step 158" }, { "id": "62aa258da314ef42ba0a1858", - "title": "Step 163" + "title": "Step 159" }, { "id": "62aa25fcb5837d43b4d9873d", - "title": "Step 164" + "title": "Step 160" }, { "id": "62aa2626c3c10244b94c787b", - "title": "Step 165" + "title": "Step 161" }, { "id": "62aa264d23cdaa45a20efada", - "title": "Step 166" + "title": "Step 162" }, { "id": "62aa26cca3cd3d46c431e73b", - "title": "Step 167" + "title": "Step 163" }, { "id": "62aa27227399d647e1c37a3c", - "title": "Step 168" + "title": "Step 164" }, { "id": "62aa27560def7048d7b4a095", - "title": "Step 169" + "title": "Step 165" }, { "id": "62aa27c40ca6f04ab8be5fac", - "title": "Step 170" - }, - { - "id": "62aa28032d863d4bd8058799", - "title": "Step 171" - }, - { - "id": "62aa287434dc284cea01157c", - "title": "Step 172" - }, - { - "id": "62aa28bbd6323e4dfb3ac43e", - "title": "Step 173" + "title": "Step 166" }, { "id": "62aa28fb651bf14efa2dbb16", - "title": "Step 174" + "title": "Step 167" }, { "id": "62aa2943669c9d5026af6985", - "title": "Step 175" + "title": "Step 168" }, { "id": "62aa2999ec27ec516655eba6", - "title": "Step 176" + "title": "Step 169" }, { "id": "62aa29d8f8f88152c91350ca", - "title": "Step 177" + "title": "Step 170" }, { "id": "62aa2aec2f09d454253aad6c", - "title": "Step 178" + "title": "Step 171" }, { "id": "62aa2ba9cd881355a6f0a5a8", - "title": "Step 179" + "title": "Step 172" } ] -} +} \ No newline at end of file diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md index 4936d4f51cd8af..78af38a649a3b6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/5d5a813321b9e3db6c106a46.md @@ -9,7 +9,7 @@ dashedName: step-1 JavaScript is a powerful language which allows you to build websites that are interactive. -*Note*: For all of the projects in this curriculum, you will need to have a basic level knowledge of HTML and CSS. If you are new to HTML and CSS, please go through the [Responsive Web Design Certification](https://www.freecodecamp.org/learn/2022/responsive-web-design/) first. +*Note*: For all remaining projects in this curriculum, you will need a basic level of knowledge in HTML and CSS. If you are new to HTML and CSS, please go through the [Responsive Web Design Certification](https://www.freecodecamp.org/learn/2022/responsive-web-design/). To get started, create your standard HTML boilerplate with a `DOCTYPE`, `html`, `head`, and `body`, then add a `meta` tag for the `charset`. Add a `title` element and use the text `RPG - Dragon Repeller` for it. Include a `link` tag for your stylesheet to link the `styles.css` file. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a115879a6d51422652cbfc.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a115879a6d51422652cbfc.md index 0b0f6d76c75b8d..b05e6b5ed0d976 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a115879a6d51422652cbfc.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a115879a6d51422652cbfc.md @@ -1,8 +1,8 @@ --- id: 62a115879a6d51422652cbfc -title: Step 15 +title: Step 11 challengeType: 0 -dashedName: step-15 +dashedName: step-11 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a1166ed9a56d439c0770e7.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a1166ed9a56d439c0770e7.md index 4023b1105add46..31b5aab1949dc6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a1166ed9a56d439c0770e7.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a1166ed9a56d439c0770e7.md @@ -1,8 +1,8 @@ --- id: 62a1166ed9a56d439c0770e7 -title: Step 16 +title: Step 12 challengeType: 0 -dashedName: step-16 +dashedName: step-12 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23c1d505bfa13747c8a9b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23c1d505bfa13747c8a9b.md index 200e4a3e3e5d24..872f15c114deb0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23c1d505bfa13747c8a9b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23c1d505bfa13747c8a9b.md @@ -1,8 +1,8 @@ --- id: 62a23c1d505bfa13747c8a9b -title: Step 17 +title: Step 13 challengeType: 0 -dashedName: step-17 +dashedName: step-13 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23cb9bc467a147516b500.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23cb9bc467a147516b500.md index 44d200f6759407..da746753d28609 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23cb9bc467a147516b500.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23cb9bc467a147516b500.md @@ -1,8 +1,8 @@ --- id: 62a23cb9bc467a147516b500 -title: Step 18 +title: Step 14 challengeType: 0 -dashedName: step-18 +dashedName: step-14 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23d1c5f1c93161f3582ae.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23d1c5f1c93161f3582ae.md index 014b0b80a8497e..d99fc9288cab85 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23d1c5f1c93161f3582ae.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a23d1c5f1c93161f3582ae.md @@ -1,8 +1,8 @@ --- id: 62a23d1c5f1c93161f3582ae -title: Step 23 +title: Step 19 challengeType: 0 -dashedName: step-23 +dashedName: step-19 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2401b9842721796b72850.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2401b9842721796b72850.md index 3fcb094569d6a5..00ed710db32f3c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2401b9842721796b72850.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2401b9842721796b72850.md @@ -1,8 +1,8 @@ --- id: 62a2401b9842721796b72850 -title: Step 24 +title: Step 20 challengeType: 0 -dashedName: step-24 +dashedName: step-20 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24068d60b671847d1d4e2.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24068d60b671847d1d4e2.md index 2d0e757295a100..5e2699cd92f4e9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24068d60b671847d1d4e2.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24068d60b671847d1d4e2.md @@ -1,8 +1,8 @@ --- id: 62a24068d60b671847d1d4e2 -title: Step 25 +title: Step 21 challengeType: 0 -dashedName: step-25 +dashedName: step-21 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2409897ec621942234cf6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2409897ec621942234cf6.md index c81de00a8ec2b6..d08f231f391a8c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2409897ec621942234cf6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2409897ec621942234cf6.md @@ -1,8 +1,8 @@ --- id: 62a2409897ec621942234cf6 -title: Step 26 +title: Step 22 challengeType: 0 -dashedName: step-26 +dashedName: step-22 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md index 81833f16e67206..201820ab04a49d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a240c67f3dbb1a1e6d95ee.md @@ -1,8 +1,8 @@ --- id: 62a240c67f3dbb1a1e6d95ee -title: Step 27 +title: Step 23 challengeType: 0 -dashedName: step-27 +dashedName: step-23 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24128d5e8af1b47ad1aab.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24128d5e8af1b47ad1aab.md index 91ef147dd670ef..fe761e7f5dd5e4 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24128d5e8af1b47ad1aab.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24128d5e8af1b47ad1aab.md @@ -1,8 +1,8 @@ --- id: 62a24128d5e8af1b47ad1aab -title: Step 28 +title: Step 24 challengeType: 0 -dashedName: step-28 +dashedName: step-24 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md index de9f6815673500..4d2f4e4141a409 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a24190868ca51c0b6e83c7.md @@ -1,8 +1,8 @@ --- id: 62a24190868ca51c0b6e83c7 -title: Step 30 +title: Step 26 challengeType: 0 -dashedName: step-30 +dashedName: step-26 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a241df03c1f61ce936f5d9.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a241df03c1f61ce936f5d9.md index bba7f696efdd60..9edacf0701af84 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a241df03c1f61ce936f5d9.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a241df03c1f61ce936f5d9.md @@ -1,8 +1,8 @@ --- id: 62a241df03c1f61ce936f5d9 -title: Step 31 +title: Step 27 challengeType: 0 -dashedName: step-31 +dashedName: step-27 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2509ba163e020bb9d84ea.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2509ba163e020bb9d84ea.md index 8ed06b8b65b214..bf66f3891579a0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2509ba163e020bb9d84ea.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a2509ba163e020bb9d84ea.md @@ -7,7 +7,13 @@ dashedName: step-2 # --description-- -Now you can start writing your JavaScript. Begin by creating a `script` element. This element is used to load JavaScript into your HTML file. You should use an opening `` tag. +Now you can start writing your JavaScript. Begin by creating a `script` element. This element is used to load JavaScript into your HTML file. + +```html + +``` # --hints-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md index e356c2b62128b5..b7628c0fd224d4 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a255dae245b52317da824a.md @@ -13,20 +13,19 @@ The developer console will include errors that are produced by your code, but yo Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `"Hello World"`. -Note how the line ends with a semi-colon. It is common practice in JavaScript to end your code lines with semi-colons. # --hints-- -You should add a `console.log("Hello World");` line to your code. Don't forget the semi-colon. +You should add a `console.log("Hello World");` line to your code. ```js -assert.match(code, /console\.log\(\s*('|")Hello World\1\s*\)\s*;/); +assert.match(code, /console\.log\(\s*('|")Hello World\1\s*\)\s*;?/); ``` Your `console.log("Hello World");` line should be between your `script` tags. ```js -assert.match(code, /\s*console\.log\(\s*('|")Hello World\1\s*\)\s*;\s*<\/script>/); +assert.match(code, /\s*console\.log\(\s*('|")Hello World\1\s*\)\s*;?\s*<\/script>/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a0a3c0a4b32915d26a6e.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a0a3c0a4b32915d26a6e.md index 53b57cc1bda752..3daf1de70f67dc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a0a3c0a4b32915d26a6e.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a0a3c0a4b32915d26a6e.md @@ -9,13 +9,19 @@ dashedName: step-6 Remove your `console.log("Hello World");` line to begin writing your project code. -In JavaScript, a variable is used to hold a value. To use a variable, you must first declare it. For example, to declare a variable called `camperbot`, you would write: +In the previous project, you learned how to work with variables and the `let` keyword like this: ```js let camperbot; ``` -The `let` keyword tells JavaScript you are declaring a variable. Declare a variable called `xp`. +You also learned how to initialize a variable with a value like this: + +```js +let age = 32; +``` + +Use the `let` keyword to declare a variable called `xp` and assign it the value of `0`, a number. # --hints-- @@ -37,18 +43,19 @@ You should declare a variable named `xp`. assert.match(code, /let\s+xp/); ``` -You should not assign a value to your variable. +`xp` should have a value of `0`. ```js -assert.notMatch(code, /let\s+xp\s*=/); +assert.equal(xp, 0); ``` -Don't forget the semi-colon at the end of the line. +You should initialize the `xp` variable to `0`. ```js -assert.match(code, /let\s+xp\s*;/); +assert.match(code, /let\s+xp\s*=\s*0\s*;?/) ``` + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md deleted file mode 100644 index fdaf7b63f09946..00000000000000 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a488b24fb32b91155d56.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: 62a3a488b24fb32b91155d56 -title: Step 7 -challengeType: 0 -dashedName: step-7 ---- - -# --description-- - -Variables can be assigned a value. When you do this while you declare it, this is called initialization. For example: - -```js -let age = 32; -``` - -This would initialize the `age` variable with a value of `32`, a number. - -Initialize your `xp` variable to have a value of `0`, a number. - -# --hints-- - -`xp` should have a value of `0`. - -```js -assert.equal(xp, 0); -``` - -You should initialize the `xp` variable to `0`. Don't forget the semi-colon at the end of the line. - -```js -assert.match(code, /let\s+xp\s*=\s*0\s*;/) -``` - -# --seed-- - -## --seed-contents-- - -```html - - - - - - RPG - Dragon Repeller - - - -
-
- - -``` - -```js ---fcc-editable-region-- -let xp; ---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/62a3a75d8466a12e009eff76.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a75d8466a12e009eff76.md index 787fa71d2507a2..2fea619185fe8d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a75d8466a12e009eff76.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a75d8466a12e009eff76.md @@ -1,8 +1,8 @@ --- id: 62a3a75d8466a12e009eff76 -title: Step 8 +title: Step 7 challengeType: 0 -dashedName: step-8 +dashedName: step-7 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a7e4f1060e2fc5ffb34b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a7e4f1060e2fc5ffb34b.md index 68dfb5af71888b..7ccd56b998442d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a7e4f1060e2fc5ffb34b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3a7e4f1060e2fc5ffb34b.md @@ -1,20 +1,14 @@ --- id: 62a3a7e4f1060e2fc5ffb34b -title: Step 9 +title: Step 8 challengeType: 0 -dashedName: step-9 +dashedName: step-8 --- # --description-- Create another variable called `currentWeapon` and set it to `0`. -When a variable name has multiple words, the convention in JavaScript is to use what's called camelCase. The first word is lowercase, and the first letter of every following word is uppercase. - -```js -let thisIsCamelCase; -``` - # --hints-- You should use `let` to declare a variable called `currentWeapon`. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b3eab50e193608c19fc6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b3eab50e193608c19fc6.md index 44b37561b88863..8f0a454900e34c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b3eab50e193608c19fc6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b3eab50e193608c19fc6.md @@ -1,13 +1,13 @@ --- id: 62a3b3eab50e193608c19fc6 -title: Step 10 +title: Step 9 challengeType: 0 -dashedName: step-10 +dashedName: step-9 --- # --description-- -Declare a variable called `fighting` but do not initialize it with a value. Remember to end your line with a semi-colon. +Declare a variable called `fighting` but do not initialize it with a value. # --hints-- @@ -23,10 +23,10 @@ Your `fighting` variable should not have a value. assert.isUndefined(fighting); ``` -You should not assign a value to your `fighting` variable. Don't forget the semi-colon at the end of the line. +You should not assign a value to your `fighting` variable. ```js -assert.match(code, /let\s+fighting\s*;/); +assert.match(code, /let\s+fighting\s*;?/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b41c9494f937560640ab.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b41c9494f937560640ab.md index 5a565ffd1b64a4..2a4b553972fe4d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b41c9494f937560640ab.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b41c9494f937560640ab.md @@ -1,13 +1,21 @@ --- id: 62a3b41c9494f937560640ab -title: Step 11 +title: Step 10 challengeType: 0 -dashedName: step-11 +dashedName: step-10 --- # --description-- -Declare two more variables named `monsterHealth` and `inventory`, but do not initialize them. +Declare two more variables named `monsterHealth` and `inventory`. + +For your `inventory` variable, assign it the value of an array containing the string `"stick"`. + +Remember that you worked with arrays in the previous project like this: + +```js +let exampleArray = ["first", "second", "third"]; +``` # --hints-- @@ -29,10 +37,10 @@ assert.match(code, /monsterHealth/); assert.isUndefined(monsterHealth); ``` -You should not assign a value to your `monsterHealth` variable. Remember your semi-colon. +You should not assign a value to your `monsterHealth` variable. ```js -assert.match(code, /let\s+monsterHealth\s*;/); +assert.match(code, /let\s+monsterHealth\s*;?/); ``` You should use `let` to declare your `inventory` variable. @@ -41,18 +49,25 @@ You should use `let` to declare your `inventory` variable. assert.match(code, /let\s+inventory/i); ``` -`inventory` should not have a value. +Your `inventory` variable should still be an array. ```js -assert.isUndefined(inventory); +assert.isArray(inventory); ``` -You should not assign a value to your `inventory` variable. Remember your semi-colon. +Your `inventory` variable should only have one value. ```js -assert.match(code, /let\s+inventory\s*;/); +assert.lengthOf(inventory, 1); ``` +Your `inventory` variable should include the string `"stick"`. + +```js +assert.include(inventory, "stick"); +``` + + # --seed-- ## --seed-contents-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b49686792938718b90d3.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b49686792938718b90d3.md deleted file mode 100644 index 5d225d1b9b451a..00000000000000 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b49686792938718b90d3.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -id: 62a3b49686792938718b90d3 -title: Step 12 -challengeType: 0 -dashedName: step-12 ---- - -# --description-- - -The variables you have assigned have all had values that are numbers. JavaScript has multiple different data types. The next one you will use is the string. Strings are used to store things like words or text. Strings are surrounded with double quotes, single quotes, or backticks. Here is an example of declaring a variable with a string: - -```js -let developer = "Naomi"; -``` - -Assign the `inventory` variable to have the value of `stick`. - -# --hints-- - -You should set `inventory` to the string `stick`. - -```js -assert.equal(inventory, "stick"); -``` - -You should initialize your `inventory` variable with the string `stick`. - -```js -assert.match(code, /let\s+inventory\s*=\s*('|"|`)stick\1/); -``` - -# --seed-- - -## --seed-contents-- - -```html - - - - - - RPG - Dragon Repeller - - - -
-
- - -``` - -```js ---fcc-editable-region-- -let xp = 0; -let health = 100; -let gold = 50; -let currentWeapon = 0; -let fighting; -let monsterHealth; -let inventory; ---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/62a3b506dbaead396f58a701.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md deleted file mode 100644 index 74ecef7e8d33c3..00000000000000 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b506dbaead396f58a701.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -id: 62a3b506dbaead396f58a701 -title: Step 13 -challengeType: 0 -dashedName: step-13 ---- - -# --description-- - -The player's inventory in your game will be able to hold multiple items. You will need to use a data type that can do this. An array can be used to hold multiple values. For example: - -```js -let order = ["first", "second", "third"]; -``` - -This is an array which holds three values. Notice how the values are separated by commas. - -Change your `inventory` variable to be an array with the strings `"stick"`, `"dagger"`, and `"sword"`. - -# --hints-- - -Your `inventory` variable should be an array. - -```js -assert.isArray(inventory); -``` - -Your `inventory` variable should have three values. - -```js -assert.lengthOf(inventory, 3); -``` - -Your `inventory` variable should include the string `"stick"`. - -```js -assert.include(inventory, "stick"); -``` - -Your `inventory` variable should include the string `"dagger"`. - -```js -assert.include(inventory, "dagger"); -``` - -Your `inventory` variable should include the string `"sword"`. - -```js -assert.include(inventory, "sword"); -``` - -Your `inventory` variable should have the values in the correct order. - -```js -assert.deepEqual(inventory, ["stick", "dagger", "sword"]); -``` - -# --seed-- - -## --seed-contents-- - -```html - - - - - - RPG - Dragon Repeller - - - -
-
- - -``` - -```js ---fcc-editable-region-- -let xp = 0; -let health = 100; -let gold = 50; -let currentWeapon = 0; -let fighting; -let monsterHealth; -let inventory = "stick"; ---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/62a3b5843544ce3a77459c27.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b5843544ce3a77459c27.md deleted file mode 100644 index b95da4d2f1572a..00000000000000 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b5843544ce3a77459c27.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -id: 62a3b5843544ce3a77459c27 -title: Step 14 -challengeType: 0 -dashedName: step-14 ---- - -# --description-- - -For now, you want the player to start with just the `"stick"`. Change the `inventory` array to have `"stick"` as its only value. - -# --hints-- - -Your `inventory` variable should still be an array. - -```js -assert.isArray(inventory); -``` - -Your `inventory` variable should only have one value. - -```js -assert.lengthOf(inventory, 1); -``` - -Your `inventory` variable should include the string `"stick"`. - -```js -assert.include(inventory, "stick"); -``` - -# --seed-- - -## --seed-contents-- - -```html - - - - - - RPG - Dragon Repeller - - - -
-
- - -``` - -```js ---fcc-editable-region-- -let xp = 0; -let health = 100; -let gold = 50; -let currentWeapon = 0; -let fighting; -let monsterHealth; -let inventory = ["stick", "dagger", "sword"]; ---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/62a3b79d520a7f3d0e25afd6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md index 6958d97c369079..d75e6619d33952 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3b79d520a7f3d0e25afd6.md @@ -1,8 +1,8 @@ --- id: 62a3b79d520a7f3d0e25afd6 -title: Step 19 +title: Step 15 challengeType: 0 -dashedName: step-19 +dashedName: step-15 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3bb9aeefe4b3fc43c6d7b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3bb9aeefe4b3fc43c6d7b.md index 742c39f1244b4e..63b8f3a8475430 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3bb9aeefe4b3fc43c6d7b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3bb9aeefe4b3fc43c6d7b.md @@ -1,8 +1,8 @@ --- id: 62a3bb9aeefe4b3fc43c6d7b -title: Step 21 +title: Step 17 challengeType: 0 -dashedName: step-21 +dashedName: step-17 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3bec30ea7f941412512dc.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3bec30ea7f941412512dc.md index 3e9326fb8409c7..491cbbb3fe307f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3bec30ea7f941412512dc.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3bec30ea7f941412512dc.md @@ -1,8 +1,8 @@ --- id: 62a3bec30ea7f941412512dc -title: Step 33 +title: Step 29 challengeType: 0 -dashedName: step-33 +dashedName: step-29 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c0ab883fd9435cd5c518.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c0ab883fd9435cd5c518.md index be0b750609516c..88bcd7392381ac 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c0ab883fd9435cd5c518.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c0ab883fd9435cd5c518.md @@ -1,19 +1,19 @@ --- id: 62a3c0ab883fd9435cd5c518 -title: Step 39 +title: Step 35 challengeType: 0 -dashedName: step-39 +dashedName: step-35 --- # --description-- -Comments allow you to add notes to your code. In JavaScript, single-line comments can be written with `//` and multi-line comments can be written with `/*` and `*/`. For example, here are single and multi-line comments that say "Hello World": +In the previous project, you learned how to work with single line and multi-line comments like this: ```js -// hello world +// I am a single-line comment /* - hello world + I am a multi-line comment */ ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md index b9cee1108571e4..b1c4d1d1b3603c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c2fccf186146b59c6e96.md @@ -1,8 +1,8 @@ --- id: 62a3c2fccf186146b59c6e96 -title: Step 40 +title: Step 36 challengeType: 0 -dashedName: step-40 +dashedName: step-36 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c4a0e52767482c5202d4.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c4a0e52767482c5202d4.md index d0a3844672967c..32cd3d6a758684 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c4a0e52767482c5202d4.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c4a0e52767482c5202d4.md @@ -1,8 +1,8 @@ --- id: 62a3c4a0e52767482c5202d4 -title: Step 41 +title: Step 37 challengeType: 0 -dashedName: step-41 +dashedName: step-37 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c668afc43b4a134cca81.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c668afc43b4a134cca81.md index 34903a04c9bafc..019bf2cdcedcad 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c668afc43b4a134cca81.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c668afc43b4a134cca81.md @@ -1,19 +1,19 @@ --- id: 62a3c668afc43b4a134cca81 -title: Step 35 +title: Step 31 challengeType: 0 -dashedName: step-35 +dashedName: step-31 --- # --description-- -Functions are special tools that allow you to run sections of code at specific times. You can declare functions using the `function` keyword. Here is an example of a function called `functionName` - note the opening and closing curly braces. These indicate the section of code that is within the function. +In the previous project, you learned how to create a function like this: ```js function functionName() { } -``` +``` Create an empty function named `goStore`. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index 8e83f0b30583dc..8e7b3cc1e77177 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -1,32 +1,26 @@ --- id: 62a3c8bf3980c14c438d2aed -title: Step 36 +title: Step 32 challengeType: 0 -dashedName: step-36 +dashedName: step-32 --- # --description-- -For now, make your `goStore` function output the message `"Going to store."` to the console. For example, here is a function that outputs the message `"Hello World"`. - -```js -function functionName() { - console.log("Hello World"); -} -``` +For now, make your `goStore` function output the message `"Going to store."` to the console. # --hints-- -You should have a `console.log("Going to store.");` line in your code. Don't forget the semi-colon. +You should have a `console.log("Going to store.");` line in your code. ```js -assert.match(code, /console\.log\(\s*('|")Going to store\.\1\s*\)\s*;/); +assert.match(code, /console\.log\(\s*('|")Going to store\.\1\s*\)\s*;?/); ``` Your `console.log("Going to store.");` line should be in your `goStore` function. ```js -assert.match(goStore.toString(), /console\.log\(\s*('|")Going to store\.\1\s*\)\s*;/); +assert.match(goStore.toString(), /console\.log\(\s*('|")Going to store\.\1\s*\)\s*;?/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c91a2bab1b4d6fabb726.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c91a2bab1b4d6fabb726.md index d7cdc5fe32c277..2638ce9ae520b6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c91a2bab1b4d6fabb726.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c91a2bab1b4d6fabb726.md @@ -1,8 +1,8 @@ --- id: 62a3c91a2bab1b4d6fabb726 -title: Step 37 +title: Step 33 challengeType: 0 -dashedName: step-37 +dashedName: step-33 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cdb11478a34ff4a6470d.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cdb11478a34ff4a6470d.md index fbfe544a9cbaf9..46025e90ee2712 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cdb11478a34ff4a6470d.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cdb11478a34ff4a6470d.md @@ -1,8 +1,8 @@ --- id: 62a3cdb11478a34ff4a6470d -title: Step 38 +title: Step 34 challengeType: 0 -dashedName: step-38 +dashedName: step-34 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cfc8328d3351b95d4f61.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cfc8328d3351b95d4f61.md index 5e09d91d7ac792..a1779a579fa019 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cfc8328d3351b95d4f61.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cfc8328d3351b95d4f61.md @@ -1,8 +1,8 @@ --- id: 62a3cfc8328d3351b95d4f61 -title: Step 42 +title: Step 38 challengeType: 0 -dashedName: step-42 +dashedName: step-38 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md index dbc3cf67f61547..7c76591109f50b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md @@ -1,8 +1,8 @@ --- id: 62a7beb1ad61211ac153707f -title: Step 43 +title: Step 39 challengeType: 0 -dashedName: step-43 +dashedName: step-39 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md index dbd739fbb44429..2be712694cf217 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md @@ -1,8 +1,8 @@ --- id: 62a7bf06d2ad9d1c5024e833 -title: Step 44 +title: Step 40 challengeType: 0 -dashedName: step-44 +dashedName: step-40 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfabe119461eb13ccbd6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfabe119461eb13ccbd6.md index 7a76266d32191f..cc90d211dd40af 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfabe119461eb13ccbd6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfabe119461eb13ccbd6.md @@ -1,8 +1,8 @@ --- id: 62a7bfabe119461eb13ccbd6 -title: Step 45 +title: Step 41 challengeType: 0 -dashedName: step-45 +dashedName: step-41 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfd9179b7f1f6a15fb1e.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfd9179b7f1f6a15fb1e.md index 30461a29476eae..b0dfcbb9d7b739 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfd9179b7f1f6a15fb1e.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfd9179b7f1f6a15fb1e.md @@ -1,8 +1,8 @@ --- id: 62a7bfd9179b7f1f6a15fb1e -title: Step 46 +title: Step 42 challengeType: 0 -dashedName: step-46 +dashedName: step-42 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c011eef9fb2084b966db.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c011eef9fb2084b966db.md index 5bcd9895593d90..d1a2df0ea4be99 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c011eef9fb2084b966db.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c011eef9fb2084b966db.md @@ -1,8 +1,8 @@ --- id: 62a7c011eef9fb2084b966db -title: Step 47 +title: Step 43 challengeType: 0 -dashedName: step-47 +dashedName: step-43 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md index a7e5ee5727bfe5..5b43ac8535299e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c071219da921758a35bb.md @@ -1,8 +1,8 @@ --- id: 62a7c071219da921758a35bb -title: Step 48 +title: Step 44 challengeType: 0 -dashedName: step-48 +dashedName: step-44 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c23e6b511f22ed71197a.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c23e6b511f22ed71197a.md index f52716edb06cbf..f31a581cc2d13a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c23e6b511f22ed71197a.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7c23e6b511f22ed71197a.md @@ -1,8 +1,8 @@ --- id: 62a7c23e6b511f22ed71197a -title: Step 49 +title: Step 45 challengeType: 0 -dashedName: step-49 +dashedName: step-45 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7cc99577fbf25ee7a7d76.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7cc99577fbf25ee7a7d76.md index 622b23ccf21dbe..353d61ea5b023c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7cc99577fbf25ee7a7d76.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7cc99577fbf25ee7a7d76.md @@ -1,20 +1,24 @@ --- id: 62a7cc99577fbf25ee7a7d76 -title: Step 50 +title: Step 46 challengeType: 0 -dashedName: step-50 +dashedName: step-46 --- # --description-- -You have repetition in the `goTown` and `goStore` functions. When you have repetition in your code, this is a sign that you need another function. Functions can take parameters, which are values that are given to the function each time it is run. Here is a function that takes a parameter called `param`: +You have repetition in the `goTown` and `goStore` functions. Repetition in your code is a sign that you need another function. + +In the previous project, you learned how to work with function parameters like this: ```js function myFunction(param) { - console.log(param); + console.log(param); } ``` +Function parameters act as placeholders for values that you pass to the function when you call it. + Create an empty `update` function that takes a parameter called `location`. # --hints-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a929e4260d08093756d2.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a929e4260d08093756d2.md index fbf52a97b9068b..e4b0df5daaf067 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a929e4260d08093756d2.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a929e4260d08093756d2.md @@ -1,8 +1,8 @@ --- id: 62a8a929e4260d08093756d2 -title: Step 51 +title: Step 47 challengeType: 0 -dashedName: step-51 +dashedName: step-47 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md index 8efad258e621a1..3c65c2afa0254b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8a9d876b2580943ba9351.md @@ -1,8 +1,8 @@ --- id: 62a8a9d876b2580943ba9351 -title: Step 58 +title: Step 54 challengeType: 0 -dashedName: step-58 +dashedName: step-54 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md index 8d983673476ff1..606ba8b880fd69 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ab0e27cbaf0b54ba8a42.md @@ -1,8 +1,8 @@ --- id: 62a8ab0e27cbaf0b54ba8a42 -title: Step 59 +title: Step 55 challengeType: 0 -dashedName: step-59 +dashedName: step-55 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ac194679e60cb561b0a8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ac194679e60cb561b0a8.md index d3a4027bf53d02..c318e051bc88d0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ac194679e60cb561b0a8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ac194679e60cb561b0a8.md @@ -1,8 +1,8 @@ --- id: 62a8ac194679e60cb561b0a8 -title: Step 60 +title: Step 56 challengeType: 0 -dashedName: step-60 +dashedName: step-56 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ad8e01d7cb0deae5ec66.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ad8e01d7cb0deae5ec66.md index c93e9be00ce84e..4337bbb7817aa3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ad8e01d7cb0deae5ec66.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ad8e01d7cb0deae5ec66.md @@ -1,8 +1,8 @@ --- id: 62a8ad8e01d7cb0deae5ec66 -title: Step 61 +title: Step 57 challengeType: 0 -dashedName: step-61 +dashedName: step-57 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ade9b2f5b30ef0b606c2.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ade9b2f5b30ef0b606c2.md index 181816ae9f0b63..84e25aa3479d32 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ade9b2f5b30ef0b606c2.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ade9b2f5b30ef0b606c2.md @@ -1,8 +1,8 @@ --- id: 62a8ade9b2f5b30ef0b606c2 -title: Step 62 +title: Step 58 challengeType: 0 -dashedName: step-62 +dashedName: step-58 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ae85fcaedc0fddc7ca4f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ae85fcaedc0fddc7ca4f.md index bb80389d95f47f..b3d8e3a6cedf8f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ae85fcaedc0fddc7ca4f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ae85fcaedc0fddc7ca4f.md @@ -1,8 +1,8 @@ --- id: 62a8ae85fcaedc0fddc7ca4f -title: Step 63 +title: Step 59 challengeType: 0 -dashedName: step-63 +dashedName: step-59 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md index 05823cf8e71545..76419553abe8d0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md @@ -1,8 +1,8 @@ --- id: 62a8b0b5053f16111b0b6b5f -title: Step 64 +title: Step 60 challengeType: 0 -dashedName: step-64 +dashedName: step-60 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md index f5a089510749f3..6a2fd6dd18e8d8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b1762b7775124622e1a3.md @@ -1,8 +1,8 @@ --- id: 62a8b1762b7775124622e1a3 -title: Step 65 +title: Step 61 challengeType: 0 -dashedName: step-65 +dashedName: step-61 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md index 9b0a55403ce536..ee22bd5db182ad 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b3cc436db8139cc5fc09.md @@ -1,8 +1,8 @@ --- id: 62a8b3cc436db8139cc5fc09 -title: Step 66 +title: Step 62 challengeType: 0 -dashedName: step-66 +dashedName: step-62 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index 2a8bfeee0c8f47..42fa1b7156bee2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -1,8 +1,8 @@ --- id: 62a8b6536156c51500739b41 -title: Step 67 +title: Step 63 challengeType: 0 -dashedName: step-67 +dashedName: step-63 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md index 4086fb7bfa5967..6df6d825b4597a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b711ab7a12161c7d9b67.md @@ -1,8 +1,8 @@ --- id: 62a8b711ab7a12161c7d9b67 -title: Step 68 +title: Step 64 challengeType: 0 -dashedName: step-68 +dashedName: step-64 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b9770050d217d2247801.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b9770050d217d2247801.md index 606710fac05999..64dbdadcc64e00 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b9770050d217d2247801.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b9770050d217d2247801.md @@ -1,8 +1,8 @@ --- id: 62a8b9770050d217d2247801 -title: Step 69 +title: Step 65 challengeType: 0 -dashedName: step-69 +dashedName: step-65 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c0c8313e891a15ec23e7.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c0c8313e891a15ec23e7.md index bd108deb851125..69288ecb4e1e35 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c0c8313e891a15ec23e7.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c0c8313e891a15ec23e7.md @@ -1,8 +1,8 @@ --- id: 62a8c0c8313e891a15ec23e7 -title: Step 70 +title: Step 66 challengeType: 0 -dashedName: step-70 +dashedName: step-66 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c1154d3ae11aee80353f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c1154d3ae11aee80353f.md index 8889db77988091..91dac7f2a0ff72 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c1154d3ae11aee80353f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c1154d3ae11aee80353f.md @@ -1,8 +1,8 @@ --- id: 62a8c1154d3ae11aee80353f -title: Step 71 +title: Step 67 challengeType: 0 -dashedName: step-71 +dashedName: step-67 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index 65ef9c3c602f4c..0bc2ea4f339a4e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -1,8 +1,8 @@ --- id: 62a8c151b23bf21bc7c4fcba -title: Step 72 +title: Step 68 challengeType: 0 -dashedName: step-72 +dashedName: step-68 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c173949f851c83c64756.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c173949f851c83c64756.md index 46f74f29cb20cf..7e8b7d6f71ea2f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c173949f851c83c64756.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c173949f851c83c64756.md @@ -1,8 +1,8 @@ --- id: 62a8c173949f851c83c64756 -title: Step 73 +title: Step 69 challengeType: 0 -dashedName: step-73 +dashedName: step-69 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c242b25a531f2909e5bc.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c242b25a531f2909e5bc.md index ad1439750e28e2..cb1dab4a818e7c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c242b25a531f2909e5bc.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c242b25a531f2909e5bc.md @@ -1,8 +1,8 @@ --- id: 62a8c242b25a531f2909e5bc -title: Step 74 +title: Step 70 challengeType: 0 -dashedName: step-74 +dashedName: step-70 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c2bbbd8aa82052f47c53.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c2bbbd8aa82052f47c53.md index 5702ce2a278461..87f4686de53ac1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c2bbbd8aa82052f47c53.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c2bbbd8aa82052f47c53.md @@ -1,8 +1,8 @@ --- id: 62a8c2bbbd8aa82052f47c53 -title: Step 75 +title: Step 71 challengeType: 0 -dashedName: step-75 +dashedName: step-71 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c31ec0ec78216a1c36a0.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c31ec0ec78216a1c36a0.md index cee5bf9a0bcb3c..b0c4f0082240c8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c31ec0ec78216a1c36a0.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c31ec0ec78216a1c36a0.md @@ -1,8 +1,8 @@ --- id: 62a8c31ec0ec78216a1c36a0 -title: Step 76 +title: Step 72 challengeType: 0 -dashedName: step-76 +dashedName: step-72 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c370ad8c68227137e0bc.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c370ad8c68227137e0bc.md index 25611f4354e80e..7f9be4c607c695 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c370ad8c68227137e0bc.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c370ad8c68227137e0bc.md @@ -1,8 +1,8 @@ --- id: 62a8c370ad8c68227137e0bc -title: Step 77 +title: Step 73 challengeType: 0 -dashedName: step-77 +dashedName: step-73 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c3ebc6c35e23785e1a19.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c3ebc6c35e23785e1a19.md index a89507052168db..43844bfd6fa61f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c3ebc6c35e23785e1a19.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c3ebc6c35e23785e1a19.md @@ -1,8 +1,8 @@ --- id: 62a8c3ebc6c35e23785e1a19 -title: Step 78 +title: Step 74 challengeType: 0 -dashedName: step-78 +dashedName: step-74 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c41ecaf1bd24536129b8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c41ecaf1bd24536129b8.md index 61a53665a8ea9a..407ef30337ef34 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c41ecaf1bd24536129b8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c41ecaf1bd24536129b8.md @@ -1,8 +1,8 @@ --- id: 62a8c41ecaf1bd24536129b8 -title: Step 79 +title: Step 75 challengeType: 0 -dashedName: step-79 +dashedName: step-75 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md index 2ed035eddc8098..b32a4624174f75 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c465fa7b0c252f4a8f0c.md @@ -1,8 +1,8 @@ --- id: 62a8c465fa7b0c252f4a8f0c -title: Step 80 +title: Step 76 challengeType: 0 -dashedName: step-80 +dashedName: step-76 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c4db0710f3260f867a92.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c4db0710f3260f867a92.md index ce8597292fc6a0..1ae8eed2293bfc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c4db0710f3260f867a92.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c4db0710f3260f867a92.md @@ -1,17 +1,15 @@ --- id: 62a8c4db0710f3260f867a92 -title: Step 81 +title: Step 77 challengeType: 0 -dashedName: step-81 +dashedName: step-77 --- # --description-- -What if the player doesn't have enough gold to buy health? When you want to run code conditionally, you can use the if statement. +What if the player doesn't have enough gold to buy health? You should use an `if` statement to check if the player has enough gold to buy health. -An `if` statement is used to make decisions in code. The keyword `if` is followed by a condition in parentheses. If the condition is true, the code inside the curly braces `{}` is executed. If the condition is false, the code inside the curly braces is skipped. - -Here is an example of an `if` statement: +In the previous project, you learned how to work with `if` statements like this: ```js const num = 5; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md index c6008307776c81..236841747669c1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c5db7888af27af23f0dd.md @@ -1,15 +1,15 @@ --- id: 62a8c5db7888af27af23f0dd -title: Step 82 +title: Step 78 challengeType: 0 -dashedName: step-82 +dashedName: step-78 --- # --description-- Now when a player tries to buy health, it will only work if they have enough money. If they do not, nothing will happen. Add an `else` statement where you can put code to run if a player does not have enough money. -Here is an example of an empty `else` statement: +In the previous project, you learned how to work with `else` statements like this: ```js if (num >= 5) { diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c65b75664c28a8e59c16.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c65b75664c28a8e59c16.md index 3551b104de6a32..a5108647216342 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c65b75664c28a8e59c16.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c65b75664c28a8e59c16.md @@ -1,8 +1,8 @@ --- id: 62a8c65b75664c28a8e59c16 -title: Step 83 +title: Step 79 challengeType: 0 -dashedName: step-83 +dashedName: step-79 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c6815f5f1a29735efe1b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c6815f5f1a29735efe1b.md index d51324ec3b4f76..df552626f1ba18 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c6815f5f1a29735efe1b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c6815f5f1a29735efe1b.md @@ -1,8 +1,8 @@ --- id: 62a8c6815f5f1a29735efe1b -title: Step 84 +title: Step 80 challengeType: 0 -dashedName: step-84 +dashedName: step-80 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c7322e42962ad53ad204.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c7322e42962ad53ad204.md index 04a5d03d51edf6..9a18056f74e076 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c7322e42962ad53ad204.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c7322e42962ad53ad204.md @@ -1,8 +1,8 @@ --- id: 62a8c7322e42962ad53ad204 -title: Step 85 +title: Step 81 challengeType: 0 -dashedName: step-85 +dashedName: step-81 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c7a59e72c02bb1c717d2.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c7a59e72c02bb1c717d2.md index 94edc0e492390f..57cf505e52bbd9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c7a59e72c02bb1c717d2.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c7a59e72c02bb1c717d2.md @@ -1,8 +1,8 @@ --- id: 62a8c7a59e72c02bb1c717d2 -title: Step 86 +title: Step 82 challengeType: 0 -dashedName: step-86 +dashedName: step-82 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index 8d792bd7414d81..a210376fd75bc7 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -1,8 +1,8 @@ --- id: 62a8c89e4272512d44fc1c66 -title: Step 87 +title: Step 83 challengeType: 0 -dashedName: step-87 +dashedName: step-83 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md index 083c848a5658cf..641048de2e1c23 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c8cee8e5cf2e001789b4.md @@ -1,8 +1,8 @@ --- id: 62a8c8cee8e5cf2e001789b4 -title: Step 88 +title: Step 84 challengeType: 0 -dashedName: step-88 +dashedName: step-84 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ca22d29fe62f3952bdf5.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ca22d29fe62f3952bdf5.md index 3336bb11d9d43a..a4c118f6f3d108 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ca22d29fe62f3952bdf5.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ca22d29fe62f3952bdf5.md @@ -1,13 +1,20 @@ --- id: 62a8ca22d29fe62f3952bdf5 -title: Step 89 +title: Step 85 challengeType: 0 -dashedName: step-89 +dashedName: step-85 --- # --description-- -Increasing a value by 1, or incrementing, has a special operator in JavaScript: `++`. If you wanted to increase `num` by 1, you could write `num++`. +In the previous project, you learned how to use the increment operator to increase a variable by `1`. + +```js +let num = 5; +num++; +// prints 6 +console.log(num); +``` Change your `currentWeapon` assignment to use the increment operator. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cb19bd7f8a304e5427a1.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cb19bd7f8a304e5427a1.md index 08039af551e333..0288af76ebfc4a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cb19bd7f8a304e5427a1.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cb19bd7f8a304e5427a1.md @@ -1,8 +1,8 @@ --- id: 62a8cb19bd7f8a304e5427a1 -title: Step 90 +title: Step 86 challengeType: 0 -dashedName: step-90 +dashedName: step-86 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cbd1e3595431d5a2b3f1.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cbd1e3595431d5a2b3f1.md index 485c8d6c5bfb2e..f2adb41b3a924a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cbd1e3595431d5a2b3f1.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cbd1e3595431d5a2b3f1.md @@ -1,8 +1,8 @@ --- id: 62a8cbd1e3595431d5a2b3f1 -title: Step 91 +title: Step 87 challengeType: 0 -dashedName: step-91 +dashedName: step-87 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md index e68a62d92b940e..0ce8646d7bac26 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cce1b0c32c33017cf2e9.md @@ -1,8 +1,8 @@ --- id: 62a8cce1b0c32c33017cf2e9 -title: Step 92 +title: Step 88 challengeType: 0 -dashedName: step-92 +dashedName: step-88 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ce1dfc990134162b3bd9.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ce1dfc990134162b3bd9.md index e9f013397d1184..eb78febdb469d5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ce1dfc990134162b3bd9.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ce1dfc990134162b3bd9.md @@ -1,8 +1,8 @@ --- id: 62a8ce1dfc990134162b3bd9 -title: Step 93 +title: Step 89 challengeType: 0 -dashedName: step-93 +dashedName: step-89 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ce73d0dce43468f6689c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ce73d0dce43468f6689c.md index faa30d5ed47d8b..065a312d032f44 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ce73d0dce43468f6689c.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ce73d0dce43468f6689c.md @@ -1,21 +1,24 @@ --- id: 62a8ce73d0dce43468f6689c -title: Step 94 +title: Step 90 challengeType: 0 -dashedName: step-94 +dashedName: step-90 --- # --description-- -You can insert variables into a string with the concatenation operator `+`. Update the `"You now have a new weapon."` string to say `"You now have a "` and the name of the new weapon. Remember to end the sentence with a period. - -Here is an example that creates the string `"Hello, our name is freeCodeCamp."`: +In the previous project, you learned how to work with the concatenation operator to insert variables into a string like this: ```js -const ourName = "freeCodeCamp"; -const ourStr = "Hello, our name is " + ourName + "."; +const organization = "freeCodeCamp"; + +// "Hello, our name is freeCodeCamp." +"Hello, our name is " + organization + "."; ``` +Update the string `"You now have a new weapon."` to `"You now have a "` followed by the name of the new weapon, and remember to end the sentence with a period. + + # --hints-- You should update the `text.innerText` assignment to start with the string `"You now have a "`. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cf22272d6d35af80d4ac.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cf22272d6d35af80d4ac.md index d91b8e44fc7f9c..643d5f7346d1d6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cf22272d6d35af80d4ac.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8cf22272d6d35af80d4ac.md @@ -1,24 +1,22 @@ --- id: 62a8cf22272d6d35af80d4ac -title: Step 95 +title: Step 91 challengeType: 0 -dashedName: step-95 +dashedName: step-91 --- # --description-- Back at the beginning of this project, you created the `inventory` array. Add the `newWeapon` to the end of the `inventory` array using the `push()` method. -Here is an example: +In the previous project, you learned how to work with the `push` method like this: ```js -const arr = ["first"]; -const next = "second"; -arr.push(next); +const myArray = []; +myArray.push("new item"); +// myArray is now ["new item"] ``` -`arr` would now have the value `["first", "second"]`. - # --hints-- You should use the `push` method on `inventory`. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md index 6cc14ed6b35e48..d81242da5a2631 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0337d7c67377a4a76c6.md @@ -1,8 +1,8 @@ --- id: 62a8d0337d7c67377a4a76c6 -title: Step 96 +title: Step 92 challengeType: 0 -dashedName: step-96 +dashedName: step-92 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d08668fa8b38732486e9.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d08668fa8b38732486e9.md index 9325a090164099..049fa2470e991f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d08668fa8b38732486e9.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d08668fa8b38732486e9.md @@ -1,8 +1,8 @@ --- id: 62a8d08668fa8b38732486e9 -title: Step 97 +title: Step 93 challengeType: 0 -dashedName: step-97 +dashedName: step-93 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0c4f12c2239b6618582.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0c4f12c2239b6618582.md index cfce0d6258d73d..0843051f5073ba 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0c4f12c2239b6618582.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0c4f12c2239b6618582.md @@ -1,8 +1,8 @@ --- id: 62a8d0c4f12c2239b6618582 -title: Step 98 +title: Step 94 challengeType: 0 -dashedName: step-98 +dashedName: step-94 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0fdf2dad83a92883a80.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0fdf2dad83a92883a80.md index 190244a01cb042..35bd5b0666b52e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0fdf2dad83a92883a80.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0fdf2dad83a92883a80.md @@ -1,8 +1,8 @@ --- id: 62a8d0fdf2dad83a92883a80 -title: Step 99 +title: Step 95 challengeType: 0 -dashedName: step-99 +dashedName: step-95 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md index b3594c8077b739..71fd3d9c5b4307 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d143f2a58e3b6d6e9c33.md @@ -1,8 +1,8 @@ --- id: 62a8d143f2a58e3b6d6e9c33 -title: Step 100 +title: Step 96 challengeType: 0 -dashedName: step-100 +dashedName: step-96 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md index b3d561e087d02d..bb0c80426bff44 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d1c72e8bb13c2074d93c.md @@ -1,8 +1,8 @@ --- id: 62a8d1c72e8bb13c2074d93c -title: Step 101 +title: Step 97 challengeType: 0 -dashedName: step-101 +dashedName: step-97 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d2146a3e853d0a6e28ca.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d2146a3e853d0a6e28ca.md index 662fa81d28c3c7..686a0495baae2b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d2146a3e853d0a6e28ca.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d2146a3e853d0a6e28ca.md @@ -1,8 +1,8 @@ --- id: 62a8d2146a3e853d0a6e28ca -title: Step 102 +title: Step 98 challengeType: 0 -dashedName: step-102 +dashedName: step-98 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md index 04c3605a94c604..f715ca108d62da 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d24c97461b3ddb9397c8.md @@ -1,8 +1,8 @@ --- id: 62a8d24c97461b3ddb9397c8 -title: Step 103 +title: Step 99 challengeType: 0 -dashedName: step-103 +dashedName: step-99 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d2e2a073be3edb46116f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d2e2a073be3edb46116f.md index f1b87cd5c34c7f..9d34d31279eff1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d2e2a073be3edb46116f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d2e2a073be3edb46116f.md @@ -1,8 +1,8 @@ --- id: 62a8d2e2a073be3edb46116f -title: Step 104 +title: Step 100 challengeType: 0 -dashedName: step-104 +dashedName: step-100 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d31ebbc10e3fe1b28e03.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d31ebbc10e3fe1b28e03.md index 13c51ecec9b707..5a34e6303f00fb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d31ebbc10e3fe1b28e03.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d31ebbc10e3fe1b28e03.md @@ -1,8 +1,8 @@ --- id: 62a8d31ebbc10e3fe1b28e03 -title: Step 105 +title: Step 101 challengeType: 0 -dashedName: step-105 +dashedName: step-101 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d35660db4040ba292193.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d35660db4040ba292193.md index 03c5acd73a8c81..5bda4148614b22 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d35660db4040ba292193.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d35660db4040ba292193.md @@ -1,8 +1,8 @@ --- id: 62a8d35660db4040ba292193 -title: Step 106 +title: Step 102 challengeType: 0 -dashedName: step-106 +dashedName: step-102 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d382cd075f4169223e14.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d382cd075f4169223e14.md index 4f41b1c8665849..0d61bfa0ce3d10 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d382cd075f4169223e14.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d382cd075f4169223e14.md @@ -1,8 +1,8 @@ --- id: 62a8d382cd075f4169223e14 -title: Step 107 +title: Step 103 challengeType: 0 -dashedName: step-107 +dashedName: step-103 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d539dc11cb42b5dd7ec8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d539dc11cb42b5dd7ec8.md index 3b4d90ac540344..1ddde02b02a19f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d539dc11cb42b5dd7ec8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d539dc11cb42b5dd7ec8.md @@ -1,17 +1,18 @@ --- id: 62a8d539dc11cb42b5dd7ec8 -title: Step 108 +title: Step 104 challengeType: 0 -dashedName: step-108 +dashedName: step-104 --- # --description-- -The `shift()` method on an array removes the first element in the array and returns it. +In the previous project, you learned how to work with the `shift()` method to remove the first element from an array like this: ```js -const numbers = [1, 2, 3]; -const firstNumber = numbers.shift(); // returns 1 +const myArray = ["first", "second", "third"]; +const firstElement = myArray.shift(); +// myArray is now ["second", "third"] ``` Use the `shift()` method to take the first element from the `inventory` array and assign it to your `currentWeapon` variable. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d61ddfe35744369365b7.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d61ddfe35744369365b7.md index cb54fbd021538e..1221ed8c4e13c6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d61ddfe35744369365b7.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d61ddfe35744369365b7.md @@ -1,8 +1,8 @@ --- id: 62a8d61ddfe35744369365b7 -title: Step 109 +title: Step 105 challengeType: 0 -dashedName: step-109 +dashedName: step-105 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d6c7001ebc45350e3d16.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d6c7001ebc45350e3d16.md index 8cc8b7e793e5ec..75ac803005da87 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d6c7001ebc45350e3d16.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d6c7001ebc45350e3d16.md @@ -1,8 +1,8 @@ --- id: 62a8d6c7001ebc45350e3d16 -title: Step 110 +title: Step 106 challengeType: 0 -dashedName: step-110 +dashedName: step-106 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d7b8ab568b4649998954.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d7b8ab568b4649998954.md index b30b05eadbd74d..68575117fbaff6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d7b8ab568b4649998954.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d7b8ab568b4649998954.md @@ -1,8 +1,8 @@ --- id: 62a8d7b8ab568b4649998954 -title: Step 111 +title: Step 107 challengeType: 0 -dashedName: step-111 +dashedName: step-107 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d81f539f004776dd9b1e.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d81f539f004776dd9b1e.md index 3ab5b08ac9d97a..f514d2da79251a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d81f539f004776dd9b1e.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d81f539f004776dd9b1e.md @@ -1,8 +1,8 @@ --- id: 62a8d81f539f004776dd9b1e -title: Step 112 +title: Step 108 challengeType: 0 -dashedName: step-112 +dashedName: step-108 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dd468debb449b4454086.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dd468debb449b4454086.md index e1a5b91bb8ba10..d19e01144a16f6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dd468debb449b4454086.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dd468debb449b4454086.md @@ -1,8 +1,8 @@ --- id: 62a8dd468debb449b4454086 -title: Step 113 +title: Step 109 challengeType: 0 -dashedName: step-113 +dashedName: step-109 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dd9cdb16324b04cfd958.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dd9cdb16324b04cfd958.md index 479b4393b9e7ba..ffe48145e138fc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dd9cdb16324b04cfd958.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dd9cdb16324b04cfd958.md @@ -1,8 +1,8 @@ --- id: 62a8dd9cdb16324b04cfd958 -title: Step 114 +title: Step 110 challengeType: 0 -dashedName: step-114 +dashedName: step-110 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md index 5d67e9ab8fbab2..c332a8e4481191 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8dfcf7fb1044d2f478fd1.md @@ -1,8 +1,8 @@ --- id: 62a8dfcf7fb1044d2f478fd1 -title: Step 115 +title: Step 111 challengeType: 0 -dashedName: step-115 +dashedName: step-111 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e0d1d0110b4ec421489f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e0d1d0110b4ec421489f.md index 290ace39b5e88b..85eae8b27d7351 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e0d1d0110b4ec421489f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e0d1d0110b4ec421489f.md @@ -1,8 +1,8 @@ --- id: 62a8e0d1d0110b4ec421489f -title: Step 116 +title: Step 112 challengeType: 0 -dashedName: step-116 +dashedName: step-112 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e142f7f0bd4fed898de3.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e142f7f0bd4fed898de3.md index 55fec328acfb9f..50f155706617a5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e142f7f0bd4fed898de3.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e142f7f0bd4fed898de3.md @@ -1,8 +1,8 @@ --- id: 62a8e142f7f0bd4fed898de3 -title: Step 117 +title: Step 113 challengeType: 0 -dashedName: step-117 +dashedName: step-113 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e1dc897df55108bcb5e8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e1dc897df55108bcb5e8.md index 04f95ddbc96d62..6ef02c83864858 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e1dc897df55108bcb5e8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e1dc897df55108bcb5e8.md @@ -1,8 +1,8 @@ --- id: 62a8e1dc897df55108bcb5e8 -title: Step 118 +title: Step 114 challengeType: 0 -dashedName: step-118 +dashedName: step-114 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md index 2d45fd3ddf0509..b520bbf617036d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e21398ad61520edb724f.md @@ -1,8 +1,8 @@ --- id: 62a8e21398ad61520edb724f -title: Step 119 +title: Step 115 challengeType: 0 -dashedName: step-119 +dashedName: step-115 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e24c673b075317cc0b09.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e24c673b075317cc0b09.md index 9b2a53c42d0492..579ec5c8621a19 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e24c673b075317cc0b09.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e24c673b075317cc0b09.md @@ -1,8 +1,8 @@ --- id: 62a8e24c673b075317cc0b09 -title: Step 120 +title: Step 116 challengeType: 0 -dashedName: step-120 +dashedName: step-116 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md index 5beeadbcae2890..14627e132912c1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e271f8e3d1541f9624ad.md @@ -1,8 +1,8 @@ --- id: 62a8e271f8e3d1541f9624ad -title: Step 121 +title: Step 117 challengeType: 0 -dashedName: step-121 +dashedName: step-117 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e35675c18c56354c08cf.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e35675c18c56354c08cf.md index 9754ab33e0fccf..f1685857f08f08 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e35675c18c56354c08cf.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e35675c18c56354c08cf.md @@ -1,8 +1,8 @@ --- id: 62a8e35675c18c56354c08cf -title: Step 122 +title: Step 118 challengeType: 0 -dashedName: step-122 +dashedName: step-118 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e41e2f190c58404dd46e.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e41e2f190c58404dd46e.md index a58791e6558f83..a3586dd06feae7 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e41e2f190c58404dd46e.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e41e2f190c58404dd46e.md @@ -1,8 +1,8 @@ --- id: 62a8e41e2f190c58404dd46e -title: Step 123 +title: Step 119 challengeType: 0 -dashedName: step-123 +dashedName: step-119 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e45cc600c3591cee671a.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e45cc600c3591cee671a.md index 30c46b14b75737..6943ee6e033a50 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e45cc600c3591cee671a.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e45cc600c3591cee671a.md @@ -1,8 +1,8 @@ --- id: 62a8e45cc600c3591cee671a -title: Step 124 +title: Step 120 challengeType: 0 -dashedName: step-124 +dashedName: step-120 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e49f4df7af5ae2d7a616.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e49f4df7af5ae2d7a616.md index 64c58990d6157c..2d83318c6f9c0e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e49f4df7af5ae2d7a616.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e49f4df7af5ae2d7a616.md @@ -1,8 +1,8 @@ --- id: 62a8e49f4df7af5ae2d7a616 -title: Step 125 +title: Step 121 challengeType: 0 -dashedName: step-125 +dashedName: step-121 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md index 5aad15c9151eb0..901571909a691b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8e4dc6a60f85bf256a0cb.md @@ -1,8 +1,8 @@ --- id: 62a8e4dc6a60f85bf256a0cb -title: Step 126 +title: Step 122 challengeType: 0 -dashedName: step-126 +dashedName: step-122 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ed36d7a7915dfa444ba2.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ed36d7a7915dfa444ba2.md index 4d3a0429bbe49a..653d5820f5027d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ed36d7a7915dfa444ba2.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ed36d7a7915dfa444ba2.md @@ -1,8 +1,8 @@ --- id: 62a8ed36d7a7915dfa444ba2 -title: Step 127 +title: Step 123 challengeType: 0 -dashedName: step-127 +dashedName: step-123 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8edd05e27cc668051686f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8edd05e27cc668051686f.md index 38470145594fac..50a3bc9cb7acde 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8edd05e27cc668051686f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8edd05e27cc668051686f.md @@ -1,8 +1,8 @@ --- id: 62a8edd05e27cc668051686f -title: Step 128 +title: Step 124 challengeType: 0 -dashedName: step-128 +dashedName: step-124 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ee154c8946678775c4a4.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ee154c8946678775c4a4.md index fd539dc2f64c54..af64a47f516b74 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ee154c8946678775c4a4.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ee154c8946678775c4a4.md @@ -1,8 +1,8 @@ --- id: 62a8ee154c8946678775c4a4 -title: Step 129 +title: Step 125 challengeType: 0 -dashedName: step-129 +dashedName: step-125 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ee71f018e968a056d369.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ee71f018e968a056d369.md index 72f4db44d1718a..11ad9171faba79 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ee71f018e968a056d369.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ee71f018e968a056d369.md @@ -1,8 +1,8 @@ --- id: 62a8ee71f018e968a056d369 -title: Step 130 +title: Step 126 challengeType: 0 -dashedName: step-130 +dashedName: step-126 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eec45f77bc69e8775294.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eec45f77bc69e8775294.md index 5aa1af52d35f2e..1127eaf800a853 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eec45f77bc69e8775294.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eec45f77bc69e8775294.md @@ -1,8 +1,8 @@ --- id: 62a8eec45f77bc69e8775294 -title: Step 131 +title: Step 127 challengeType: 0 -dashedName: step-131 +dashedName: step-127 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eefe2e68b66ac563816b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eefe2e68b66ac563816b.md index 07e38822e6432a..25e8e44da69273 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eefe2e68b66ac563816b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eefe2e68b66ac563816b.md @@ -1,8 +1,8 @@ --- id: 62a8eefe2e68b66ac563816b -title: Step 132 +title: Step 128 challengeType: 0 -dashedName: step-132 +dashedName: step-128 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ef6a52292f6bdca4f6f8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ef6a52292f6bdca4f6f8.md index e341017d59404c..10b88e02a7453a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ef6a52292f6bdca4f6f8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ef6a52292f6bdca4f6f8.md @@ -1,8 +1,8 @@ --- id: 62a8ef6a52292f6bdca4f6f8 -title: Step 133 +title: Step 129 challengeType: 0 -dashedName: step-133 +dashedName: step-129 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ef8f0c76a46cd221a68c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ef8f0c76a46cd221a68c.md index 1212f88ec7f66b..83d4102af7e17d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ef8f0c76a46cd221a68c.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8ef8f0c76a46cd221a68c.md @@ -1,8 +1,8 @@ --- id: 62a8ef8f0c76a46cd221a68c -title: Step 134 +title: Step 130 challengeType: 0 -dashedName: step-134 +dashedName: step-130 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8efb0e3ce826db8daf80f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8efb0e3ce826db8daf80f.md index 7e65c5eba54f24..de6edff955d08c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8efb0e3ce826db8daf80f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8efb0e3ce826db8daf80f.md @@ -1,8 +1,8 @@ --- id: 62a8efb0e3ce826db8daf80f -title: Step 135 +title: Step 131 challengeType: 0 -dashedName: step-135 +dashedName: step-131 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md index f13707d78927d8..9a8282ca463b1e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eff21c0b0f6ebe5b8e38.md @@ -1,8 +1,8 @@ --- id: 62a8eff21c0b0f6ebe5b8e38 -title: Step 136 +title: Step 132 challengeType: 0 -dashedName: step-136 +dashedName: step-132 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md index eb78660013cdd7..26330da5b0b0d1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f06fb318666fef69f91e.md @@ -1,8 +1,8 @@ --- id: 62a8f06fb318666fef69f91e -title: Step 137 +title: Step 133 challengeType: 0 -dashedName: step-137 +dashedName: step-133 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md index 55f5523b2918cc..d3d163e5feb646 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f14fe6d1fc72454648c7.md @@ -1,8 +1,8 @@ --- id: 62a8f14fe6d1fc72454648c7 -title: Step 138 +title: Step 134 challengeType: 0 -dashedName: step-138 +dashedName: step-134 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f1d5f5ddbf74c07f733b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f1d5f5ddbf74c07f733b.md index 74fbeebbe0dcb0..8e80502b606d32 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f1d5f5ddbf74c07f733b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f1d5f5ddbf74c07f733b.md @@ -1,8 +1,8 @@ --- id: 62a8f1d5f5ddbf74c07f733b -title: Step 139 +title: Step 135 challengeType: 0 -dashedName: step-139 +dashedName: step-135 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f20463b324759953edad.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f20463b324759953edad.md index 2dc1c86e61ed7a..3629f3f80bec7b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f20463b324759953edad.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f20463b324759953edad.md @@ -1,8 +1,8 @@ --- id: 62a8f20463b324759953edad -title: Step 140 +title: Step 136 challengeType: 0 -dashedName: step-140 +dashedName: step-136 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md index 698e646c46e9bd..e97696c7b25feb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f256b813a476cae51f49.md @@ -1,25 +1,16 @@ --- id: 62a8f256b813a476cae51f49 -title: Step 142 +title: Step 138 challengeType: 0 -dashedName: step-142 +dashedName: step-138 --- # --description-- Back to your `attack` function - inside the `else if` block, create another `if` and `else` statement. If the player is fighting the dragon (`fighting` would be `2`), call the `winGame` function. Move the `defeatMonster()` call to the `else` block. -For this step, you will need to use the strict equality (`===`) operator to check if `fighting` is equal to `2`. The strict equality operator will check if the values are equal and if they are the same data type. +For this step, you will need to use the strict equality (`===`) operator to check if `fighting` is equal to `2`. -Here is an example that checks if `num` is strictly equal to `5`: - -```js -if (num === 5) { - -} else { - -} -``` # --hints-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f35bde1750791f58773f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f35bde1750791f58773f.md index 91f81ee17229dd..756899ded11926 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f35bde1750791f58773f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8f35bde1750791f58773f.md @@ -1,8 +1,8 @@ --- id: 62a8f35bde1750791f58773f -title: Step 144 +title: Step 140 challengeType: 0 -dashedName: step-144 +dashedName: step-140 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a94114ce0b8918b487390f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a94114ce0b8918b487390f.md index e971b4063a63e0..4ebba386dc23a6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a94114ce0b8918b487390f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a94114ce0b8918b487390f.md @@ -1,8 +1,8 @@ --- id: 62a94114ce0b8918b487390f -title: Step 145 +title: Step 141 challengeType: 0 -dashedName: step-145 +dashedName: step-141 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1cea594f152ba626b872.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1cea594f152ba626b872.md index d15163e906c7be..6af4844b9b0e6f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1cea594f152ba626b872.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1cea594f152ba626b872.md @@ -1,8 +1,8 @@ --- id: 62aa1cea594f152ba626b872 -title: Step 146 +title: Step 142 challengeType: 0 -dashedName: step-146 +dashedName: step-142 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d6736ba262cfa74344b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d6736ba262cfa74344b.md index 7f14259af9a181..1cea04cd6f67a0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d6736ba262cfa74344b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d6736ba262cfa74344b.md @@ -1,8 +1,8 @@ --- id: 62aa1d6736ba262cfa74344b -title: Step 147 +title: Step 143 challengeType: 0 -dashedName: step-147 +dashedName: step-143 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d9f535e102e4663e7a6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d9f535e102e4663e7a6.md index 3bc841e4a5171c..ee441940ce8cad 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d9f535e102e4663e7a6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d9f535e102e4663e7a6.md @@ -1,8 +1,8 @@ --- id: 62aa1d9f535e102e4663e7a6 -title: Step 148 +title: Step 144 challengeType: 0 -dashedName: step-148 +dashedName: step-144 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1e3c7c3d552fb04f0f18.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1e3c7c3d552fb04f0f18.md index f6b819f50f3ccc..83c5a242498fbf 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1e3c7c3d552fb04f0f18.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1e3c7c3d552fb04f0f18.md @@ -1,8 +1,8 @@ --- id: 62aa1e3c7c3d552fb04f0f18 -title: Step 149 +title: Step 145 challengeType: 0 -dashedName: step-149 +dashedName: step-145 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1e8ccd579330e097ce44.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1e8ccd579330e097ce44.md index c4ddb26860aeaa..a3456209c68130 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1e8ccd579330e097ce44.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1e8ccd579330e097ce44.md @@ -1,13 +1,19 @@ --- id: 62aa1e8ccd579330e097ce44 -title: Step 150 +title: Step 146 challengeType: 0 -dashedName: step-150 +dashedName: step-146 --- # --description-- -Functions run specific blocks of code when they are called, but they can also return a value. This value can be assigned to a variable and used elsewhere in your code. +In the previous project, you learned how to work with the `return` keyword to return a value from a function like this: + +```js +function add(num1, num2) { + return num1 + num2; +} +``` Use the `return` keyword to return the value of `hit` at the end of the function. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1eec891ed731db227a36.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1eec891ed731db227a36.md index d1608de76e65a2..9234064e7e85c8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1eec891ed731db227a36.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1eec891ed731db227a36.md @@ -1,8 +1,8 @@ --- id: 62aa1eec891ed731db227a36 -title: Step 151 +title: Step 147 challengeType: 0 -dashedName: step-151 +dashedName: step-147 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md index de792701605ebd..73ba72a5e935bf 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1fed3d4e873366ff3131.md @@ -1,8 +1,8 @@ --- id: 62aa1fed3d4e873366ff3131 -title: Step 152 +title: Step 148 challengeType: 0 -dashedName: step-152 +dashedName: step-148 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa204c1e1d33348ff09944.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa204c1e1d33348ff09944.md index 0d0bee883ab19a..dc97d27c3a3e14 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa204c1e1d33348ff09944.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa204c1e1d33348ff09944.md @@ -1,8 +1,8 @@ --- id: 62aa204c1e1d33348ff09944 -title: Step 153 +title: Step 149 challengeType: 0 -dashedName: step-153 +dashedName: step-149 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md index 185ece757fe283..e819e312b50913 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa20e9cf1be9358f5aceae.md @@ -1,8 +1,8 @@ --- id: 62aa20e9cf1be9358f5aceae -title: Step 154 +title: Step 150 challengeType: 0 -dashedName: step-154 +dashedName: step-150 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2136fc49b836dfedb959.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2136fc49b836dfedb959.md index 203df39a05d970..8fc2410f5fb00a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2136fc49b836dfedb959.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2136fc49b836dfedb959.md @@ -1,8 +1,8 @@ --- id: 62aa2136fc49b836dfedb959 -title: Step 155 +title: Step 151 challengeType: 0 -dashedName: step-155 +dashedName: step-151 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md index 67e4cedd158b9d..3373ee16aac6a2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21971e3b743844849985.md @@ -1,8 +1,8 @@ --- id: 62aa21971e3b743844849985 -title: Step 156 +title: Step 152 challengeType: 0 -dashedName: step-156 +dashedName: step-152 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21ea8d9d9f396b95dd87.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21ea8d9d9f396b95dd87.md index 176a844f7553de..5b0e1d087463fa 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21ea8d9d9f396b95dd87.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa21ea8d9d9f396b95dd87.md @@ -1,8 +1,8 @@ --- id: 62aa21ea8d9d9f396b95dd87 -title: Step 157 +title: Step 153 challengeType: 0 -dashedName: step-157 +dashedName: step-153 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa226207f33d3ad4c6f546.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa226207f33d3ad4c6f546.md index b19bbcf89d9232..64d95e31761e25 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa226207f33d3ad4c6f546.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa226207f33d3ad4c6f546.md @@ -1,8 +1,8 @@ --- id: 62aa226207f33d3ad4c6f546 -title: Step 158 +title: Step 154 challengeType: 0 -dashedName: step-158 +dashedName: step-154 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa22aba186563bcbf2c395.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa22aba186563bcbf2c395.md index 2b9eed15097411..596bf64e19187a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa22aba186563bcbf2c395.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa22aba186563bcbf2c395.md @@ -1,8 +1,8 @@ --- id: 62aa22aba186563bcbf2c395 -title: Step 159 +title: Step 155 challengeType: 0 -dashedName: step-159 +dashedName: step-155 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa234322d4ad3e8bce42cc.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa234322d4ad3e8bce42cc.md index ca8b34b7f079e8..7920967ef55b33 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa234322d4ad3e8bce42cc.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa234322d4ad3e8bce42cc.md @@ -1,8 +1,8 @@ --- id: 62aa234322d4ad3e8bce42cc -title: Step 160 +title: Step 156 challengeType: 0 -dashedName: step-160 +dashedName: step-156 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2469c77b363fdb4f0e06.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2469c77b363fdb4f0e06.md index c38927b4a1aeed..f15af6ce8da208 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2469c77b363fdb4f0e06.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2469c77b363fdb4f0e06.md @@ -1,8 +1,8 @@ --- id: 62aa2469c77b363fdb4f0e06 -title: Step 161 +title: Step 157 challengeType: 0 -dashedName: step-161 +dashedName: step-157 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa252c3b1073415ba2b898.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa252c3b1073415ba2b898.md index b22d53438b5fbf..b0c21cb567eeac 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa252c3b1073415ba2b898.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa252c3b1073415ba2b898.md @@ -1,8 +1,8 @@ --- id: 62aa252c3b1073415ba2b898 -title: Step 162 +title: Step 158 challengeType: 0 -dashedName: step-162 +dashedName: step-158 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa258da314ef42ba0a1858.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa258da314ef42ba0a1858.md index 6140324e8d2032..b42d8c73a09f22 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa258da314ef42ba0a1858.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa258da314ef42ba0a1858.md @@ -1,8 +1,8 @@ --- id: 62aa258da314ef42ba0a1858 -title: Step 163 +title: Step 159 challengeType: 0 -dashedName: step-163 +dashedName: step-159 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa25fcb5837d43b4d9873d.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa25fcb5837d43b4d9873d.md index 5569f0b3041d49..be1817da63a407 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa25fcb5837d43b4d9873d.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa25fcb5837d43b4d9873d.md @@ -1,8 +1,8 @@ --- id: 62aa25fcb5837d43b4d9873d -title: Step 164 +title: Step 160 challengeType: 0 -dashedName: step-164 +dashedName: step-160 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2626c3c10244b94c787b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2626c3c10244b94c787b.md index abd39435ff5cb9..2b5671c9bc3296 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2626c3c10244b94c787b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2626c3c10244b94c787b.md @@ -1,8 +1,8 @@ --- id: 62aa2626c3c10244b94c787b -title: Step 165 +title: Step 161 challengeType: 0 -dashedName: step-165 +dashedName: step-161 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa264d23cdaa45a20efada.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa264d23cdaa45a20efada.md index fb314dfcdd8e1d..2d57a9ac154c3c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa264d23cdaa45a20efada.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa264d23cdaa45a20efada.md @@ -1,21 +1,19 @@ --- id: 62aa264d23cdaa45a20efada -title: Step 166 +title: Step 162 challengeType: 0 -dashedName: step-166 +dashedName: step-162 --- # --description-- -After your `numbers` array, create a `while` loop. A while loop accepts a condition, and will run the code in the block until the condition is no longer true. +After your `numbers` array, create a `while` loop that runs as long as `numbers.length` is less than `10`. -Your `while` loop should run while `numbers.length` is less than `10`. - -Here is an example of a `while` loop that runs while `i` is less than five. +In the previous project, you learned how to work with `while` loops like this: ```js -while (i < 5) { - +while (condition) { + // code to run } ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa26cca3cd3d46c431e73b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa26cca3cd3d46c431e73b.md index 42ed30704e6936..afadb2e4af57a3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa26cca3cd3d46c431e73b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa26cca3cd3d46c431e73b.md @@ -1,8 +1,8 @@ --- id: 62aa26cca3cd3d46c431e73b -title: Step 167 +title: Step 163 challengeType: 0 -dashedName: step-167 +dashedName: step-163 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27227399d647e1c37a3c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27227399d647e1c37a3c.md index 5bf10c528b695c..e50763ac21bb84 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27227399d647e1c37a3c.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27227399d647e1c37a3c.md @@ -1,8 +1,8 @@ --- id: 62aa27227399d647e1c37a3c -title: Step 168 +title: Step 164 challengeType: 0 -dashedName: step-168 +dashedName: step-164 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27560def7048d7b4a095.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27560def7048d7b4a095.md index 1014ee44a1709d..9a2c1ce131743d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27560def7048d7b4a095.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27560def7048d7b4a095.md @@ -1,8 +1,8 @@ --- id: 62aa27560def7048d7b4a095 -title: Step 169 +title: Step 165 challengeType: 0 -dashedName: step-169 +dashedName: step-165 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27c40ca6f04ab8be5fac.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27c40ca6f04ab8be5fac.md index bba8cbd5d6e7b9..751fe4ec11ce09 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27c40ca6f04ab8be5fac.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa27c40ca6f04ab8be5fac.md @@ -1,26 +1,43 @@ --- id: 62aa27c40ca6f04ab8be5fac -title: Step 170 +title: Step 166 challengeType: 0 -dashedName: step-170 +dashedName: step-166 --- # --description-- -A `for` loop runs for a specific number of times. We will break down how a `for` loop runs in the next several steps. For now, copy this loop below and paste it at the end of your `pick` function. +In the previous project, you learned how to work with `for` loops like this: ```js -for (let x = 1; x < 5; x++) { - +for (let i = 0; i < 5; i++) { + // code to run } ``` +`for` loops are declared with three expressions separated by semicolons: `for (a; b; c)`, where `a` is the initialization expression, `b` is the condition, and `c` is the final expression. + +In this step, create a `for` loop where `i` is initialized to `0`, the loop runs as long as `i` is less than `10`, and `i` is incremented by `1` after each iteration using the increment operator `++`. + + # --hints-- -You should copy the above loop into your `pick` function. +Your `for` loop initialization should have `i` initialized to `0`. + +```js +assert.match(pick.toString(), /for\s*\(\s*(let|var)\s+i\s*=\s*0\s*;/) +``` + +Your loop condition should run as long as `i` is less than `10`. + +```js +assert.match(pick.toString(), /for\s*\(\s*(let|var)\s+i\s*=\s*0\s*;\s*i\s*<\s*10\s*;/) +``` + +Your loop should increment `i` by `1` after each iteration. Remember to use the increment operator `++`. ```js -assert.match(pick.toString(), /for\s*\(\s*(let|var)\s+x\s*=\s*1\s*;\s*x\s*<\s*5\s*;\s*x\s*\+\+\s*\)/); +assert.match(pick.toString(), /for\s*\(\s*(let|var)\s+i\s*=\s*0\s*;\s*i\s*<\s*10\s*;\s*i\+\+\s*\)/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa28032d863d4bd8058799.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa28032d863d4bd8058799.md deleted file mode 100644 index 9da6c0e84f1cf8..00000000000000 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa28032d863d4bd8058799.md +++ /dev/null @@ -1,388 +0,0 @@ ---- -id: 62aa28032d863d4bd8058799 -title: Step 171 -challengeType: 0 -dashedName: step-171 ---- - -# --description-- - -`for` loops are declared with three expressions separated by semicolons. `for (a; b; c)`, where `a` is the initialization expression, `b` is the condition, and `c` is the final expression. - -The initialization expression is executed only once, before the loop starts, and is often used to define and set up the loop variable. Think of it like declaring a counter to use in your loop. - -Many `for` loops use `i` as the counter and start from `0`, so change `let x = 1;` to `let i = 0;`. - -# --hints-- - -You should change your initialization in the `for` loop to be `let i = 0;`. - -```js -assert.match(pick.toString(), /for\s*\(\s*(let|var)\s+i\s*=\s*0\s*;/) -``` - -# --seed-- - -## --seed-contents-- - -```html - - - - - - RPG - Dragon Repeller - - -
-
- XP: 0 - Health: 100 - Gold: 50 -
-
- - - -
-
- Monster Name: - Health: -
-
- Welcome to Dragon Repeller. You must defeat the dragon that is preventing people from leaving the town. You are in the town square. Where do you want to go? Use the buttons above. -
-
- - - -``` - -```css -body { - background-color: #0a0a23; -} - -#text { - background-color: #0a0a23; - color: #ffffff; - padding: 10px; -} - -#game { - max-width: 500px; - max-height: 400px; - background-color: #ffffff; - color: #ffffff; - margin: 30px auto 0px; - padding: 10px; -} - -#controls, -#stats { - border: 1px solid #0a0a23; - padding: 5px; - color: #0a0a23; -} - -#monsterStats { - display: none; - border: 1px solid #0a0a23; - padding: 5px; - color: #ffffff; - background-color: #c70d0d; -} - -.stat { - padding-right: 10px; -} - -button { - cursor: pointer; - color: #0a0a23; - background-color: #feac32; - background-image: linear-gradient(#fecc4c, #ffac33); - border: 3px solid #feac32; -} -``` - -```js -let xp = 0; -let health = 100; -let gold = 50; -let currentWeapon = 0; -let fighting; -let monsterHealth; -let inventory = ["stick"]; - -const button1 = document.querySelector('#button1'); -const button2 = document.querySelector("#button2"); -const button3 = document.querySelector("#button3"); -const text = document.querySelector("#text"); -const xpText = document.querySelector("#xpText"); -const healthText = document.querySelector("#healthText"); -const goldText = document.querySelector("#goldText"); -const monsterStats = document.querySelector("#monsterStats"); -const monsterName = document.querySelector("#monsterName"); -const monsterHealthText = document.querySelector("#monsterHealth"); -const weapons = [ - { name: 'stick', power: 5 }, - { name: 'dagger', power: 30 }, - { name: 'claw hammer', power: 50 }, - { name: 'sword', power: 100 } -]; -const monsters = [ - { - name: "slime", - level: 2, - health: 15 - }, - { - name: "fanged beast", - level: 8, - health: 60 - }, - { - name: "dragon", - level: 20, - health: 300 - } -] -const locations = [ - { - name: "town square", - "button text": ["Go to store", "Go to cave", "Fight dragon"], - "button functions": [goStore, goCave, fightDragon], - text: "You are in the town square. You see a sign that says \"Store\"." - }, - { - name: "store", - "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"], - "button functions": [buyHealth, buyWeapon, goTown], - text: "You enter the store." - }, - { - name: "cave", - "button text": ["Fight slime", "Fight fanged beast", "Go to town square"], - "button functions": [fightSlime, fightBeast, goTown], - text: "You enter the cave. You see some monsters." - }, - { - name: "fight", - "button text": ["Attack", "Dodge", "Run"], - "button functions": [attack, dodge, goTown], - text: "You are fighting a monster." - }, - { - name: "kill monster", - "button text": ["Go to town square", "Go to town square", "Go to town square"], - "button functions": [goTown, goTown, goTown], - text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.' - }, - { - name: "lose", - "button text": ["REPLAY?", "REPLAY?", "REPLAY?"], - "button functions": [restart, restart, restart], - text: "You die. ☠" - }, - { - name: "win", - "button text": ["REPLAY?", "REPLAY?", "REPLAY?"], - "button functions": [restart, restart, restart], - text: "You defeat the dragon! YOU WIN THE GAME! 🎉" - }, - { - name: "easter egg", - "button text": ["2", "8", "Go to town square?"], - "button functions": [pickTwo, pickEight, goTown], - 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!" - } -]; - -// initialize buttons -button1.onclick = goStore; -button2.onclick = goCave; -button3.onclick = fightDragon; - -function update(location) { - monsterStats.style.display = "none"; - button1.innerText = location["button text"][0]; - button2.innerText = location["button text"][1]; - button3.innerText = location["button text"][2]; - button1.onclick = location["button functions"][0]; - button2.onclick = location["button functions"][1]; - button3.onclick = location["button functions"][2]; - text.innerHTML = location.text; -} - -function goTown() { - update(locations[0]); -} - -function goStore() { - update(locations[1]); -} - -function goCave() { - update(locations[2]); -} - -function buyHealth() { - if (gold >= 10) { - gold -= 10; - health += 10; - goldText.innerText = gold; - healthText.innerText = health; - } else { - text.innerText = "You do not have enough gold to buy health."; - } -} - -function buyWeapon() { - if (currentWeapon < weapons.length - 1) { - if (gold >= 30) { - gold -= 30; - currentWeapon++; - goldText.innerText = gold; - let newWeapon = weapons[currentWeapon].name; - text.innerText = "You now have a " + newWeapon + "."; - inventory.push(newWeapon); - text.innerText += " In your inventory you have: " + inventory; - } else { - text.innerText = "You do not have enough gold to buy a weapon."; - } - } else { - text.innerText = "You already have the most powerful weapon!"; - button2.innerText = "Sell weapon for 15 gold"; - button2.onclick = sellWeapon; - } -} - -function sellWeapon() { - if (inventory.length > 1) { - gold += 15; - goldText.innerText = gold; - let currentWeapon = inventory.shift(); - text.innerText = "You sold a " + currentWeapon + "."; - text.innerText += " In your inventory you have: " + inventory; - } else { - text.innerText = "Don't sell your only weapon!"; - } -} - -function fightSlime() { - fighting = 0; - goFight(); -} - -function fightBeast() { - fighting = 1; - goFight(); -} - -function fightDragon() { - fighting = 2; - goFight(); -} - -function goFight() { - update(locations[3]); - monsterHealth = monsters[fighting].health; - monsterStats.style.display = "block"; - monsterName.innerText = monsters[fighting].name; - monsterHealthText.innerText = monsterHealth; -} - -function attack() { - text.innerText = "The " + monsters[fighting].name + " attacks."; - text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; - health -= getMonsterAttackValue(monsters[fighting].level); - if (isMonsterHit()) { - monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1; - } else { - text.innerText += " You miss."; - } - healthText.innerText = health; - monsterHealthText.innerText = monsterHealth; - if (health <= 0) { - lose(); - } else if (monsterHealth <= 0) { - if (fighting === 2) { - winGame(); - } else { - defeatMonster(); - } - } - if (Math.random() <= .1 && inventory.length !== 1) { - text.innerText += " Your " + inventory.pop() + " breaks."; - currentWeapon--; - } -} - -function getMonsterAttackValue(level) { - const hit = (level * 5) - (Math.floor(Math.random() * xp)); - console.log(hit); - return hit > 0 ? hit : 0; -} - -function isMonsterHit() { - return Math.random() > .2 || health < 20; -} - -function dodge() { - text.innerText = "You dodge the attack from the " + monsters[fighting].name; -} - -function defeatMonster() { - gold += Math.floor(monsters[fighting].level * 6.7); - xp += monsters[fighting].level; - goldText.innerText = gold; - xpText.innerText = xp; - update(locations[4]); -} - -function lose() { - update(locations[5]); -} - -function winGame() { - update(locations[6]); -} - -function restart() { - xp = 0; - health = 100; - gold = 50; - currentWeapon = 0; - inventory = ["stick"]; - goldText.innerText = gold; - healthText.innerText = health; - xpText.innerText = xp; - goTown(); -} - -function easterEgg() { - update(locations[7]); -} - -function pickTwo() { - pick(2); -} - -function pickEight() { - pick(8); -} - ---fcc-editable-region-- -function pick(guess) { - const numbers = []; - while (numbers.length < 10) { - numbers.push(Math.floor(Math.random() * 11)); - } - text.innerText = "You picked " + guess + ". Here are the random numbers:\n"; - for (let x = 1; x < 5; x++) { - - } -} ---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/62aa287434dc284cea01157c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa287434dc284cea01157c.md deleted file mode 100644 index 346adeb6fa0a22..00000000000000 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa287434dc284cea01157c.md +++ /dev/null @@ -1,386 +0,0 @@ ---- -id: 62aa287434dc284cea01157c -title: Step 172 -challengeType: 0 -dashedName: step-172 ---- - -# --description-- - -The second statement in a `for` loop, the condition statement, is evaluated at the beginning of every loop iteration. The loop will continue as long as the condition evaluates to be true. - -We want the loop to run `10` times, so change `x < 5` to `i < 10`. - -# --hints-- - -You should update your condition statement to be `i < 10`. - -```js -assert.match(pick.toString(), /for\s*\(\s*(let|var)\s+i\s*=\s*0\s*;\s*i\s*<\s*10\s*;/) -``` - -# --seed-- - -## --seed-contents-- - -```html - - - - - - RPG - Dragon Repeller - - -
-
- XP: 0 - Health: 100 - Gold: 50 -
-
- - - -
-
- Monster Name: - Health: -
-
- Welcome to Dragon Repeller. You must defeat the dragon that is preventing people from leaving the town. You are in the town square. Where do you want to go? Use the buttons above. -
-
- - - -``` - -```css -body { - background-color: #0a0a23; -} - -#text { - background-color: #0a0a23; - color: #ffffff; - padding: 10px; -} - -#game { - max-width: 500px; - max-height: 400px; - background-color: #ffffff; - color: #ffffff; - margin: 30px auto 0px; - padding: 10px; -} - -#controls, -#stats { - border: 1px solid #0a0a23; - padding: 5px; - color: #0a0a23; -} - -#monsterStats { - display: none; - border: 1px solid #0a0a23; - padding: 5px; - color: #ffffff; - background-color: #c70d0d; -} - -.stat { - padding-right: 10px; -} - -button { - cursor: pointer; - color: #0a0a23; - background-color: #feac32; - background-image: linear-gradient(#fecc4c, #ffac33); - border: 3px solid #feac32; -} -``` - -```js -let xp = 0; -let health = 100; -let gold = 50; -let currentWeapon = 0; -let fighting; -let monsterHealth; -let inventory = ["stick"]; - -const button1 = document.querySelector('#button1'); -const button2 = document.querySelector("#button2"); -const button3 = document.querySelector("#button3"); -const text = document.querySelector("#text"); -const xpText = document.querySelector("#xpText"); -const healthText = document.querySelector("#healthText"); -const goldText = document.querySelector("#goldText"); -const monsterStats = document.querySelector("#monsterStats"); -const monsterName = document.querySelector("#monsterName"); -const monsterHealthText = document.querySelector("#monsterHealth"); -const weapons = [ - { name: 'stick', power: 5 }, - { name: 'dagger', power: 30 }, - { name: 'claw hammer', power: 50 }, - { name: 'sword', power: 100 } -]; -const monsters = [ - { - name: "slime", - level: 2, - health: 15 - }, - { - name: "fanged beast", - level: 8, - health: 60 - }, - { - name: "dragon", - level: 20, - health: 300 - } -] -const locations = [ - { - name: "town square", - "button text": ["Go to store", "Go to cave", "Fight dragon"], - "button functions": [goStore, goCave, fightDragon], - text: "You are in the town square. You see a sign that says \"Store\"." - }, - { - name: "store", - "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"], - "button functions": [buyHealth, buyWeapon, goTown], - text: "You enter the store." - }, - { - name: "cave", - "button text": ["Fight slime", "Fight fanged beast", "Go to town square"], - "button functions": [fightSlime, fightBeast, goTown], - text: "You enter the cave. You see some monsters." - }, - { - name: "fight", - "button text": ["Attack", "Dodge", "Run"], - "button functions": [attack, dodge, goTown], - text: "You are fighting a monster." - }, - { - name: "kill monster", - "button text": ["Go to town square", "Go to town square", "Go to town square"], - "button functions": [goTown, goTown, goTown], - text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.' - }, - { - name: "lose", - "button text": ["REPLAY?", "REPLAY?", "REPLAY?"], - "button functions": [restart, restart, restart], - text: "You die. ☠" - }, - { - name: "win", - "button text": ["REPLAY?", "REPLAY?", "REPLAY?"], - "button functions": [restart, restart, restart], - text: "You defeat the dragon! YOU WIN THE GAME! 🎉" - }, - { - name: "easter egg", - "button text": ["2", "8", "Go to town square?"], - "button functions": [pickTwo, pickEight, goTown], - 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!" - } -]; - -// initialize buttons -button1.onclick = goStore; -button2.onclick = goCave; -button3.onclick = fightDragon; - -function update(location) { - monsterStats.style.display = "none"; - button1.innerText = location["button text"][0]; - button2.innerText = location["button text"][1]; - button3.innerText = location["button text"][2]; - button1.onclick = location["button functions"][0]; - button2.onclick = location["button functions"][1]; - button3.onclick = location["button functions"][2]; - text.innerHTML = location.text; -} - -function goTown() { - update(locations[0]); -} - -function goStore() { - update(locations[1]); -} - -function goCave() { - update(locations[2]); -} - -function buyHealth() { - if (gold >= 10) { - gold -= 10; - health += 10; - goldText.innerText = gold; - healthText.innerText = health; - } else { - text.innerText = "You do not have enough gold to buy health."; - } -} - -function buyWeapon() { - if (currentWeapon < weapons.length - 1) { - if (gold >= 30) { - gold -= 30; - currentWeapon++; - goldText.innerText = gold; - let newWeapon = weapons[currentWeapon].name; - text.innerText = "You now have a " + newWeapon + "."; - inventory.push(newWeapon); - text.innerText += " In your inventory you have: " + inventory; - } else { - text.innerText = "You do not have enough gold to buy a weapon."; - } - } else { - text.innerText = "You already have the most powerful weapon!"; - button2.innerText = "Sell weapon for 15 gold"; - button2.onclick = sellWeapon; - } -} - -function sellWeapon() { - if (inventory.length > 1) { - gold += 15; - goldText.innerText = gold; - let currentWeapon = inventory.shift(); - text.innerText = "You sold a " + currentWeapon + "."; - text.innerText += " In your inventory you have: " + inventory; - } else { - text.innerText = "Don't sell your only weapon!"; - } -} - -function fightSlime() { - fighting = 0; - goFight(); -} - -function fightBeast() { - fighting = 1; - goFight(); -} - -function fightDragon() { - fighting = 2; - goFight(); -} - -function goFight() { - update(locations[3]); - monsterHealth = monsters[fighting].health; - monsterStats.style.display = "block"; - monsterName.innerText = monsters[fighting].name; - monsterHealthText.innerText = monsterHealth; -} - -function attack() { - text.innerText = "The " + monsters[fighting].name + " attacks."; - text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; - health -= getMonsterAttackValue(monsters[fighting].level); - if (isMonsterHit()) { - monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1; - } else { - text.innerText += " You miss."; - } - healthText.innerText = health; - monsterHealthText.innerText = monsterHealth; - if (health <= 0) { - lose(); - } else if (monsterHealth <= 0) { - if (fighting === 2) { - winGame(); - } else { - defeatMonster(); - } - } - if (Math.random() <= .1 && inventory.length !== 1) { - text.innerText += " Your " + inventory.pop() + " breaks."; - currentWeapon--; - } -} - -function getMonsterAttackValue(level) { - const hit = (level * 5) - (Math.floor(Math.random() * xp)); - console.log(hit); - return hit > 0 ? hit : 0; -} - -function isMonsterHit() { - return Math.random() > .2 || health < 20; -} - -function dodge() { - text.innerText = "You dodge the attack from the " + monsters[fighting].name; -} - -function defeatMonster() { - gold += Math.floor(monsters[fighting].level * 6.7); - xp += monsters[fighting].level; - goldText.innerText = gold; - xpText.innerText = xp; - update(locations[4]); -} - -function lose() { - update(locations[5]); -} - -function winGame() { - update(locations[6]); -} - -function restart() { - xp = 0; - health = 100; - gold = 50; - currentWeapon = 0; - inventory = ["stick"]; - goldText.innerText = gold; - healthText.innerText = health; - xpText.innerText = xp; - goTown(); -} - -function easterEgg() { - update(locations[7]); -} - -function pickTwo() { - pick(2); -} - -function pickEight() { - pick(8); -} - ---fcc-editable-region-- -function pick(guess) { - const numbers = []; - while (numbers.length < 10) { - numbers.push(Math.floor(Math.random() * 11)); - } - text.innerText = "You picked " + guess + ". Here are the random numbers:\n"; - for (let i = 0; x < 5; x++) { - - } -} ---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/62aa28bbd6323e4dfb3ac43e.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa28bbd6323e4dfb3ac43e.md deleted file mode 100644 index 1dd28e8ad74716..00000000000000 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa28bbd6323e4dfb3ac43e.md +++ /dev/null @@ -1,386 +0,0 @@ ---- -id: 62aa28bbd6323e4dfb3ac43e -title: Step 173 -challengeType: 0 -dashedName: step-173 ---- - -# --description-- - -The last statement in a `for` loop, the final expression, is executed at the end of each loop iteration. - -Since we changed the initialization statement to use `i` instead of `x`, change `x++` to `i++`. This will increment the initializer `i` by 1 after each loop. - -# --hints-- - -You should change your final expression to `i++`. - -```js -assert.match(pick.toString(), /for\s*\(\s*(let|var)\s+i\s*=\s*0\s*;\s*i\s*<\s*10\s*;\s*i\+\+\s*\)/) -``` - -# --seed-- - -## --seed-contents-- - -```html - - - - - - RPG - Dragon Repeller - - -
-
- XP: 0 - Health: 100 - Gold: 50 -
-
- - - -
-
- Monster Name: - Health: -
-
- Welcome to Dragon Repeller. You must defeat the dragon that is preventing people from leaving the town. You are in the town square. Where do you want to go? Use the buttons above. -
-
- - - -``` - -```css -body { - background-color: #0a0a23; -} - -#text { - background-color: #0a0a23; - color: #ffffff; - padding: 10px; -} - -#game { - max-width: 500px; - max-height: 400px; - background-color: #ffffff; - color: #ffffff; - margin: 30px auto 0px; - padding: 10px; -} - -#controls, -#stats { - border: 1px solid #0a0a23; - padding: 5px; - color: #0a0a23; -} - -#monsterStats { - display: none; - border: 1px solid #0a0a23; - padding: 5px; - color: #ffffff; - background-color: #c70d0d; -} - -.stat { - padding-right: 10px; -} - -button { - cursor: pointer; - color: #0a0a23; - background-color: #feac32; - background-image: linear-gradient(#fecc4c, #ffac33); - border: 3px solid #feac32; -} -``` - -```js -let xp = 0; -let health = 100; -let gold = 50; -let currentWeapon = 0; -let fighting; -let monsterHealth; -let inventory = ["stick"]; - -const button1 = document.querySelector('#button1'); -const button2 = document.querySelector("#button2"); -const button3 = document.querySelector("#button3"); -const text = document.querySelector("#text"); -const xpText = document.querySelector("#xpText"); -const healthText = document.querySelector("#healthText"); -const goldText = document.querySelector("#goldText"); -const monsterStats = document.querySelector("#monsterStats"); -const monsterName = document.querySelector("#monsterName"); -const monsterHealthText = document.querySelector("#monsterHealth"); -const weapons = [ - { name: 'stick', power: 5 }, - { name: 'dagger', power: 30 }, - { name: 'claw hammer', power: 50 }, - { name: 'sword', power: 100 } -]; -const monsters = [ - { - name: "slime", - level: 2, - health: 15 - }, - { - name: "fanged beast", - level: 8, - health: 60 - }, - { - name: "dragon", - level: 20, - health: 300 - } -] -const locations = [ - { - name: "town square", - "button text": ["Go to store", "Go to cave", "Fight dragon"], - "button functions": [goStore, goCave, fightDragon], - text: "You are in the town square. You see a sign that says \"Store\"." - }, - { - name: "store", - "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"], - "button functions": [buyHealth, buyWeapon, goTown], - text: "You enter the store." - }, - { - name: "cave", - "button text": ["Fight slime", "Fight fanged beast", "Go to town square"], - "button functions": [fightSlime, fightBeast, goTown], - text: "You enter the cave. You see some monsters." - }, - { - name: "fight", - "button text": ["Attack", "Dodge", "Run"], - "button functions": [attack, dodge, goTown], - text: "You are fighting a monster." - }, - { - name: "kill monster", - "button text": ["Go to town square", "Go to town square", "Go to town square"], - "button functions": [goTown, goTown, goTown], - text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.' - }, - { - name: "lose", - "button text": ["REPLAY?", "REPLAY?", "REPLAY?"], - "button functions": [restart, restart, restart], - text: "You die. ☠" - }, - { - name: "win", - "button text": ["REPLAY?", "REPLAY?", "REPLAY?"], - "button functions": [restart, restart, restart], - text: "You defeat the dragon! YOU WIN THE GAME! 🎉" - }, - { - name: "easter egg", - "button text": ["2", "8", "Go to town square?"], - "button functions": [pickTwo, pickEight, goTown], - 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!" - } -]; - -// initialize buttons -button1.onclick = goStore; -button2.onclick = goCave; -button3.onclick = fightDragon; - -function update(location) { - monsterStats.style.display = "none"; - button1.innerText = location["button text"][0]; - button2.innerText = location["button text"][1]; - button3.innerText = location["button text"][2]; - button1.onclick = location["button functions"][0]; - button2.onclick = location["button functions"][1]; - button3.onclick = location["button functions"][2]; - text.innerHTML = location.text; -} - -function goTown() { - update(locations[0]); -} - -function goStore() { - update(locations[1]); -} - -function goCave() { - update(locations[2]); -} - -function buyHealth() { - if (gold >= 10) { - gold -= 10; - health += 10; - goldText.innerText = gold; - healthText.innerText = health; - } else { - text.innerText = "You do not have enough gold to buy health."; - } -} - -function buyWeapon() { - if (currentWeapon < weapons.length - 1) { - if (gold >= 30) { - gold -= 30; - currentWeapon++; - goldText.innerText = gold; - let newWeapon = weapons[currentWeapon].name; - text.innerText = "You now have a " + newWeapon + "."; - inventory.push(newWeapon); - text.innerText += " In your inventory you have: " + inventory; - } else { - text.innerText = "You do not have enough gold to buy a weapon."; - } - } else { - text.innerText = "You already have the most powerful weapon!"; - button2.innerText = "Sell weapon for 15 gold"; - button2.onclick = sellWeapon; - } -} - -function sellWeapon() { - if (inventory.length > 1) { - gold += 15; - goldText.innerText = gold; - let currentWeapon = inventory.shift(); - text.innerText = "You sold a " + currentWeapon + "."; - text.innerText += " In your inventory you have: " + inventory; - } else { - text.innerText = "Don't sell your only weapon!"; - } -} - -function fightSlime() { - fighting = 0; - goFight(); -} - -function fightBeast() { - fighting = 1; - goFight(); -} - -function fightDragon() { - fighting = 2; - goFight(); -} - -function goFight() { - update(locations[3]); - monsterHealth = monsters[fighting].health; - monsterStats.style.display = "block"; - monsterName.innerText = monsters[fighting].name; - monsterHealthText.innerText = monsterHealth; -} - -function attack() { - text.innerText = "The " + monsters[fighting].name + " attacks."; - text.innerText += " You attack it with your " + weapons[currentWeapon].name + "."; - health -= getMonsterAttackValue(monsters[fighting].level); - if (isMonsterHit()) { - monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1; - } else { - text.innerText += " You miss."; - } - healthText.innerText = health; - monsterHealthText.innerText = monsterHealth; - if (health <= 0) { - lose(); - } else if (monsterHealth <= 0) { - if (fighting === 2) { - winGame(); - } else { - defeatMonster(); - } - } - if (Math.random() <= .1 && inventory.length !== 1) { - text.innerText += " Your " + inventory.pop() + " breaks."; - currentWeapon--; - } -} - -function getMonsterAttackValue(level) { - const hit = (level * 5) - (Math.floor(Math.random() * xp)); - console.log(hit); - return hit > 0 ? hit : 0; -} - -function isMonsterHit() { - return Math.random() > .2 || health < 20; -} - -function dodge() { - text.innerText = "You dodge the attack from the " + monsters[fighting].name; -} - -function defeatMonster() { - gold += Math.floor(monsters[fighting].level * 6.7); - xp += monsters[fighting].level; - goldText.innerText = gold; - xpText.innerText = xp; - update(locations[4]); -} - -function lose() { - update(locations[5]); -} - -function winGame() { - update(locations[6]); -} - -function restart() { - xp = 0; - health = 100; - gold = 50; - currentWeapon = 0; - inventory = ["stick"]; - goldText.innerText = gold; - healthText.innerText = health; - xpText.innerText = xp; - goTown(); -} - -function easterEgg() { - update(locations[7]); -} - -function pickTwo() { - pick(2); -} - -function pickEight() { - pick(8); -} - ---fcc-editable-region-- -function pick(guess) { - const numbers = []; - while (numbers.length < 10) { - numbers.push(Math.floor(Math.random() * 11)); - } - text.innerText = "You picked " + guess + ". Here are the random numbers:\n"; - for (let i = 0; i < 10; x++) { - - } -} ---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/62aa28fb651bf14efa2dbb16.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa28fb651bf14efa2dbb16.md index 9c20ad6f340792..811ee355450625 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa28fb651bf14efa2dbb16.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa28fb651bf14efa2dbb16.md @@ -1,8 +1,8 @@ --- id: 62aa28fb651bf14efa2dbb16 -title: Step 174 +title: Step 167 challengeType: 0 -dashedName: step-174 +dashedName: step-167 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2943669c9d5026af6985.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2943669c9d5026af6985.md index aeaa5b9386115d..ac864c3f1f36bf 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2943669c9d5026af6985.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2943669c9d5026af6985.md @@ -1,8 +1,8 @@ --- id: 62aa2943669c9d5026af6985 -title: Step 175 +title: Step 168 challengeType: 0 -dashedName: step-175 +dashedName: step-168 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2999ec27ec516655eba6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2999ec27ec516655eba6.md index 73fd8f460edc49..76b4baac8537c7 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2999ec27ec516655eba6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2999ec27ec516655eba6.md @@ -1,8 +1,8 @@ --- id: 62aa2999ec27ec516655eba6 -title: Step 176 +title: Step 169 challengeType: 0 -dashedName: step-176 +dashedName: step-169 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa29d8f8f88152c91350ca.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa29d8f8f88152c91350ca.md index 430077c5f304ac..aa69770e2c40a9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa29d8f8f88152c91350ca.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa29d8f8f88152c91350ca.md @@ -1,8 +1,8 @@ --- id: 62aa29d8f8f88152c91350ca -title: Step 177 +title: Step 170 challengeType: 0 -dashedName: step-177 +dashedName: step-170 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2aec2f09d454253aad6c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2aec2f09d454253aad6c.md index 98475155ee9392..ee2a6fd349a896 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2aec2f09d454253aad6c.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2aec2f09d454253aad6c.md @@ -1,8 +1,8 @@ --- id: 62aa2aec2f09d454253aad6c -title: Step 178 +title: Step 171 challengeType: 0 -dashedName: step-178 +dashedName: step-171 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2ba9cd881355a6f0a5a8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2ba9cd881355a6f0a5a8.md index 387478644b6fbd..9512617370df84 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2ba9cd881355a6f0a5a8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa2ba9cd881355a6f0a5a8.md @@ -1,8 +1,8 @@ --- id: 62aa2ba9cd881355a6f0a5a8 -title: Step 179 +title: Step 172 challengeType: 0 -dashedName: step-179 +dashedName: step-172 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62b46e3a8d4be31be5af793d.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62b46e3a8d4be31be5af793d.md index 29d15e8555d800..db3e2b0cc04dea 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62b46e3a8d4be31be5af793d.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62b46e3a8d4be31be5af793d.md @@ -1,8 +1,8 @@ --- id: 62b46e3a8d4be31be5af793d -title: Step 20 +title: Step 16 challengeType: 0 -dashedName: step-20 +dashedName: step-16 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62ba17beef16c563069a65d8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62ba17beef16c563069a65d8.md index d6d926bb80936e..6d3d77f0fedafb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62ba17beef16c563069a65d8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62ba17beef16c563069a65d8.md @@ -1,8 +1,8 @@ --- id: 62ba17beef16c563069a65d8 -title: Step 141 +title: Step 137 challengeType: 0 -dashedName: step-141 +dashedName: step-137 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc1ee0c5a89717d4785729.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc1ee0c5a89717d4785729.md index af95e4c8d19c4f..f0978d9f11e05e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc1ee0c5a89717d4785729.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc1ee0c5a89717d4785729.md @@ -1,8 +1,8 @@ --- id: 62fc1ee0c5a89717d4785729 -title: Step 29 +title: Step 25 challengeType: 0 -dashedName: step-29 +dashedName: step-25 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md index 199b7fc325e030..c38becdee8cf75 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc20387ef88d1d1998aac5.md @@ -1,8 +1,8 @@ --- id: 62fc20387ef88d1d1998aac5 -title: Step 22 +title: Step 18 challengeType: 0 -dashedName: step-22 +dashedName: step-18 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md index 18089ca1d4442b..27be8c27ee8a80 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62fc211760bfc220f4734800.md @@ -1,8 +1,8 @@ --- id: 62fc211760bfc220f4734800 -title: Step 34 +title: Step 30 challengeType: 0 -dashedName: step-34 +dashedName: step-30 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6577ea4f23e3ba1217007bc7.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6577ea4f23e3ba1217007bc7.md index c1c8298a5a5a6d..4335e3d15426de 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6577ea4f23e3ba1217007bc7.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6577ea4f23e3ba1217007bc7.md @@ -1,8 +1,8 @@ --- id: 6577ea4f23e3ba1217007bc7 -title: Step 32 +title: Step 28 challengeType: 0 -dashedName: step-32 +dashedName: step-28 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/65b2f6acce65b7a69751a090.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/65b2f6acce65b7a69751a090.md index e83db1de522786..c83387bc8d4231 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/65b2f6acce65b7a69751a090.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/65b2f6acce65b7a69751a090.md @@ -1,8 +1,8 @@ --- id: 65b2f6acce65b7a69751a090 -title: Step 143 +title: Step 139 challengeType: 0 -dashedName: step-143 +dashedName: step-139 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/660880e67dfed9eb6adb7178.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/660880e67dfed9eb6adb7178.md index 252721ed0ecec1..f54857b4be94c0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/660880e67dfed9eb6adb7178.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/660880e67dfed9eb6adb7178.md @@ -1,8 +1,8 @@ --- id: 660880e67dfed9eb6adb7178 -title: Step 52 +title: Step 48 challengeType: 0 -dashedName: step-52 +dashedName: step-48 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/66088382bd1422ed8b5309c3.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/66088382bd1422ed8b5309c3.md index f52225cbd4a047..cf7719f8bddc39 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/66088382bd1422ed8b5309c3.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/66088382bd1422ed8b5309c3.md @@ -1,8 +1,8 @@ --- id: 66088382bd1422ed8b5309c3 -title: Step 53 +title: Step 49 challengeType: 0 -dashedName: step-53 +dashedName: step-49 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/66088621742011f008175e5e.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/66088621742011f008175e5e.md index 413f0e8287b71f..5e318ebe7e8021 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/66088621742011f008175e5e.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/66088621742011f008175e5e.md @@ -1,8 +1,8 @@ --- id: 66088621742011f008175e5e -title: Step 55 +title: Step 51 challengeType: 0 -dashedName: step-55 +dashedName: step-51 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608b7985f4ba5127cbc401b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608b7985f4ba5127cbc401b.md index 5ce069f8df8712..e98b6ce05c6c5e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608b7985f4ba5127cbc401b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608b7985f4ba5127cbc401b.md @@ -1,8 +1,8 @@ --- id: 6608b7985f4ba5127cbc401b -title: Step 56 +title: Step 52 challengeType: 0 -dashedName: step-56 +dashedName: step-52 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608b8713915f21398ff32e1.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608b8713915f21398ff32e1.md index 5604eef54b9e6b..ced19321751e2f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608b8713915f21398ff32e1.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608b8713915f21398ff32e1.md @@ -1,8 +1,8 @@ --- id: 6608b8713915f21398ff32e1 -title: Step 54 +title: Step 50 challengeType: 0 -dashedName: step-54 +dashedName: step-50 --- # --description-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608bee87c43ca194effebdf.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608bee87c43ca194effebdf.md index 307adccc740d68..6a86c63a1a2056 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608bee87c43ca194effebdf.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/6608bee87c43ca194effebdf.md @@ -1,8 +1,8 @@ --- id: 6608bee87c43ca194effebdf -title: Step 57 +title: Step 53 challengeType: 0 -dashedName: step-57 +dashedName: step-53 --- # --description--