Skip to content

DARYNA_TKACHENKO-w2-UsingAPIs #16

Open
dashaaaa21 wants to merge 1 commit intoHackYourAssignment:mainfrom
dashaaaa21:DARYNA_TKACHENKO-w2-UsingAPIs
Open

DARYNA_TKACHENKO-w2-UsingAPIs #16
dashaaaa21 wants to merge 1 commit intoHackYourAssignment:mainfrom
dashaaaa21:DARYNA_TKACHENKO-w2-UsingAPIs

Conversation

@dashaaaa21
Copy link

No description provided.

Copy link

@codethenpizza codethenpizza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks great!

function fetchAndPopulatePokemons(/* TODO parameter(s) go here */) {
// TODO complete this function
async function fetchAndPopulatePokemons() {
const url = 'https://pokeapi.co/api/v2/pokemon?limit=150';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it!
It's really good practice to keep such things in separate variables and not define them right in the functions like this: fetchData('https://pokeapi.co/api/v2/pokemon?limit=151');

Great that you did it!

);
renderLaureates(laureates);

if (Array.isArray(data.laureates)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to make sure it's safe, but in this case, it might be redundant as it seems like the API always returns an array, even when the params are wrong, like unknown country

Screenshot 2025-10-13 at 16 38 28

You don't need to make any changes, just wanted to highlight it

return rollDie().then((value) => {
if (value !== desiredValue) {
return rollDieUntil(desiredValue);
export async function rollDieUntil(desiredValue: DieFace): Promise<DieFace> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it something you uploaded by accident?

@dashaaaa21
Copy link
Author

Thank you so much for reviewing my work and for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants