7 lines300 B

fetch("https://api.github.com/repos/torvalds/linux")
.then(res => {
if (!res.ok) throw new Error(`HTTP ${res.status}`);
return res.json();
})
.then(repo => console.log(`${repo.full_name}: ${repo.stargazers_count} stars`))
.catch(err => console.error("Request failed:", err.message));