
CSS
1
Вклад в тег
Какая разница между парковкой и автомобилем
fetch('https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits')
.then(response => response.json())
.then(() => alert('Я скажу привет 2'));
alert('Я скажу привет 1')
async function helloWorld () {
let url = 'https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits';
let response = await fetch(url); // Останавливаем выполнение кода пока promise не будет выполнен
let commits = await response.json();
alert(commits[0].author.login);
}