let deckId
function handleClick() {
fetch("https://apis.scrimba.com/deckofcards/api/deck/new/shuffle/")
.then(res => res.json())
.then(data => {
console.log(data)
deckId = data.deck_id
})
}
document.getElementById("new-deck").addEventListener("click", handleClick)
/**
* Challenge
*
* Task: Using the saved deckId, draw 2 new cards from the deck
*
* Docs for original Deck of Cards API: https://deckofcardsapi.com/#draw-card
* BaseUrl you'll use: https://apis.scrimba.com/deckofcards/api/deck/
* (that will replace the base url of https://deckofcardsapi.com/api/deck/)
* that you'll see in the deck of cards API docs.
*/