docs
docs copied to clipboard
JavascriptBridge Snake-Game Curriculum: No callout of transition from if/else to case statement
SUMMARY:
In Lesson 6, we help students set up the moveSegment
function, using an if/else
statement. In Lesson 7, without any explanation, we display the moveSegment
function using a case
statement and tell the students their snake.js
file should look like that.
Students were confused by this switch and weren't sure where the changes came from. This transition is worth a callout/explanation.
STEPS TO REPRODUCE:
-
In
Lesson 6
we definemoveSegment
as: -
In
Lesson 7
we definemoveSegment
as: -
Note that we do not callout in the curriculum, this transition from
if/else
tocase
. Students found this confusing and wondered if they had missed a step.
EXPECTATION:
We would like to see an explanation of the transition from the if/else
checking to case
.