js beta build a RPG step 150 and step 151 can be combined #54866
Labels
help wanted
Open for all. You do not need permission to work on these.
new javascript course
These are for issues dealing with the new JS curriculum
scope: curriculum
Lessons, Challenges, Projects and other Curricular Content in curriculum directory.
type: bug
Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Describe the Issue
I noticed that step 150 of the RPG js beta curriculum asks us to create an if statement at a specific line in the editor (which happens to be blank) and then in step 151, it tells us to move the line that is currently below the new if statement inside the if block.
I feel this could have been done in one step by just telling us to create an if statement around the line
monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
so we're not having to move it (or move our curly brace around it in a separate step). It seems like something simple to ask and shouldn't require 2 steps to do this?The current step 150 instruction is:
In your attack function, below the health variable, create an if statement. Set the condition to call the isMonsterHit function.
which can become for eg:
In your attack function, find the line of code that updates the monsterHealth variable and place it within an if block with a condition that calls the isMonsterHit function.
Affected Page
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-javascript-by-building-a-role-playing-game/step-150
Your code
N/A
Expected behavior
ask the learner to create the if statement around the code instead of create the if in step 150 then move the code into it in step 151
Screenshots
No response
System
N/A
Additional context
No response
The text was updated successfully, but these errors were encountered: