Actually getting user input can be a little tricky, so what I'd say is you get the user to type GOAL=40 rather than just 40:
var GOAL = 30;
print("What is your goal?");
Bluetooth.inject("GOAL="); // writes 'GOAL=' to the input line
// ...
if (steps == GOAL) print("Congratulations ... ");
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Actually getting user input can be a little tricky, so what I'd say is you get the user to type
GOAL=40
rather than just40
: