Skip to content

Latest commit

 

History

History

319-typeMatchup

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

typeMatchup

Interview question of the issue #319 of rendezvous with cassidoo.

The Question

Using the PokéAPI (or your own local setup) write a function that takes in a Pokémon type, and returns what that type is weak against, and strong against. Here is the listing of types and here's an example JSON for the fighting type!

Example:

> typeMatchup('fighting')
> "Weak against flying, psychic, and fairy. Strong against normal, rock, steel, ice, and dark."

> typeMatchup('cassidy')
> "This is not a valid Pokémon type, she's weak against everything."
// You can put whatever you want in this response, heh.

Installing & Running

Just pnpm i to install all dependencies and then pnpm t to run the tests!