# Find the Pin explainer

The aim of this puzzle: Change the `pinNumber` value so that `lock1` and `lock2` become 100.
Walkthrough of the solution: Both locks use the same `pinNumber` to unlock, but you need to figure out what the value is. The value is a number, but how do the locks use that number? `lock1` takes the number 110 and subtracts the `pinNumber`, and `lock2` takes 90 and adds the `pinNumber`. We need both of these locks to equal 100 without changing their formulas. What number added to 90 makes 100? What number do you need when subtracting from 110 to create 100? Update the ‘pinNumber’ value to be that number. For the if statement in this puzzle you don’t need to change or update it — it’s simply checking that both `lock1` and `lock2` are equal to 100.

Where does the print of the lock values come from — it doesn’t seem to be in the code? In this puzzle there is a little bit of hidden code that declares the two variables `lock1` and `lock2` and then prints out their values.

Sample code solution:
(Tap below to reveal)

``````var pinNumber = 10;
lock1 = lock1 - pinNumber;
lock2 = lock2 + pinNumber;
if (lock1 === 100 && lock2 === 100) {
print('You cracked the code!')
}
``````

JavaScript Concepts: Arithmetic Operators (+, -), Assignments, Binary Expressions (+, -), Calling Functions
Grasshopper Concepts: print()