Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const getOwl = async () =>
- return await fetch(`https://owl.dekmak.co`).json();
- const drawMeAnOwl = (owl) => {
- const owlHolder = document.getElementById('area');
- const owlDressing = `
- <div class="logo">
- <img src="${owl.image}" />
- <p style="font-weight:bold">DEKMAK</p>
- <p>${owl.tagline}</p>
- </div>
- <div class="slogan">
- <p>${owl.slogan}</p>
- </div>
- `;
- owlHolder.innerHTML = owlDressing;
- }
- getOwl()
- .then(owl => drawMeAnOwl(owl))
- .catch(err => throw new Error(`No Owls found :(`));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement