Giter VIP home page Giter VIP logo

phase-1-practice-dog-ceo's Introduction

Fetch Dog CEO

Learning Goals

  • Practice accessing information from APIs and using it to update the DOM
  • Practice listening for user events and updating the DOM in response

Introduction

In this lab, you will write JavaScript to get images of dogs and a list of dog breeds from API's and render them to the DOM. You will also add some click behavior to the list elements and implement a filter.

Note that this lab does not contain tests. You will be working from the requirements described below and verifying that your code is working correctly in the browser.

Once you're done, be sure to commit and push your code up to GitHub, then submit the assignment using CodeGrade. Even though this practice lab does not have tests, it must still be submitted through CodeGrade in order to be marked as complete in Canvas.

Challenge 1

This repository includes an index.html file that loads an index.js file.

const imgUrl = "https://dog.ceo/api/breeds/image/random/4";

Add JavaScript that:

  • on page load, fetches the images using the url above ⬆️
  • parses the response as JSON
  • adds image elements to the DOM for each 🤔 image in the array

Hint: Recall that you will need to ensure that your JavaScript doesn't run until after the HTML has loaded. You can use whichever method you prefer to accomplish this.

Challenge 2

const breedUrl = "https://dog.ceo/api/breeds/list/all";

After the first challenge is completed, add JavaScript that:

  • on page load, fetches all the dog breeds using the url above ⬆️
  • adds the breeds to the page in the <ul> provided in index.html

Challenge 3

Once all of the breeds are rendered in the <ul>, add JavaScript so that, when the user clicks on any one of the <li>s, the font color of that <li> changes. This can be a color of your choosing.


Challenge 4

Once we are able to load all of the dog breeds onto the page, add JavaScript so that the user can filter breeds that start with a particular letter using a dropdown.

For example, if the user selects 'a' in the dropdown, only show the breeds with names that start with the letter a. For simplicity, the dropdown only includes the letters a-d. However, we can imagine expanding this to include the entire alphabet.


dog ceo

phase-1-practice-dog-ceo's People

Contributors

ihollander avatar jlboba avatar lizbur10 avatar maxwellbenton avatar realandrewcohn avatar rrcobb avatar wisammechano avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phase-1-practice-dog-ceo's Issues

Professor Pazos' video was really blurry

Canvas Link

https://learning.flatironschool.com/courses/5292/assignments/179657?module_item_id=396931

Concern

Hi! I was following along with Professor Pazos' recorded lecture on "Fetch Dog CEO" YouTube from the excel spreadsheet and the video quality was really blurry. I looked at it over two days in two different places over two different wifi connections, on my laptop and ipad both of which are pretty new. I was able to squint and deal but it did give me a headache. I could barely make out the code she was typing in. Maybe it is my issue? Just wondering if there could be a sharper video put in its place or if you could look into it? Thank you!

Link:
https://youtu.be/Bu_9qN9ZJBE

Additional Context

No response

Suggested Changes

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.