

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Welcome to Build a Pokedex
incomplete
2: Build
incomplete
3: Tests
incomplete
4: REPL
incomplete
5: Help and Exit
incomplete
This lesson's interactive features are locked, please to keep using them
REPL stands for "read-eval-print loop". It's a common type of program that allows for interactivity. You type in a command, and the program evaluates it and prints the result. You can then type in another command, and so on.
Your native terminal's command line is a REPL! Our Pokedex will also be a REPL. In this step, we're just going to build the bones of the REPL: a loop that parses and cleans an input and prints the first word back to the user. Here is what your program should be able to do after this step:
> go run .
Pokedex > help me
help
Pokedex > Exit
exit
Pokedex > WHAT even is a pokeman?
what
Pokedex > is our own custom command line prompt. The program waited and recorded my input (in the first instance, help me) and didn't continue until I pressed enter.
wagslane@MacBook-Pro-2 pokedexcli % go run .
Pokedex > well hello there
Your command was: well
Pokedex > Hello there
Your command was: hello
Pokedex > POKEMON was underrated
Your command was: pokemon
You can terminate the program by pressing ctrl+c.
go run . | tee repl.log
CHARMANDER is better than bulbasaur.Pikachu is kinda mean to ash.ctrl+c.Run and submit the CLI tests.