# Winter Is Coming explainer

#1

The aim of this puzzle: Take 10 seeds away from the Ant and give them to the Grasshopper.

Walkthrough of the solution: The first 3 lines of code create the 3 variables: `ant` who has 40 seeds, `grasshopper` who has 0 seeds, and `gift` which has 10 seeds. The `ant` is paying for the gift, so the value of `ant` should go down by 10. The `-=` operator is used to decrease a variable’s value. The `grasshopper` is receiving the `gift`, so it gets the `gift` added to its value. Using `grasshopper += gift` will add the `gift` value (10) to grasshopper (0 --> 10).

Sample code solution:
(Tap below to reveal)

``````let ant = 40;
let grasshopper = 0;
print('The Ant has ' + ant + ' seeds, and the Grasshopper has '
+ grasshopper + ' seeds');
``````

JavaScript Concepts: Assignment Operators (`+=`, `-=`), Binary Expression (`+` concatenation)

Grasshopper Concepts: `print()`

#4

#5

I did what it said but it still doesn’t work…help please.

#6

Could you post a screenshot of your code?

–Frankie

#7

I figured out, I was using the code without realizing it.

#8

I can not figure out what’s wrong with is

#9

Gift is a var, not a string