Skip to content

Instantly share code, notes, and snippets.

View ivankisyov's full-sized avatar
🤓
Console Logger, Level 4

Ivanman ivankisyov

🤓
Console Logger, Level 4
View GitHub Profile
@ivankisyov
ivankisyov / promises.md
Last active October 14, 2018 15:03
Promises

Promises

Promise.all

node.js

const axios = require("axios");

const getCountriesByRegion = region => {
@ivankisyov
ivankisyov / asyncAwait.md
Last active October 14, 2018 15:00
Async Await

Async Await {Node.js}

if a function returns a promise, you can AWAIT the result of that promise!

const axios = require("axios");

const getCountry = async countryCode => {
  try {
    const response = await axios.get(