This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Summing numbers | |
const sum = (a, b) => { | |
return a + b | |
} | |
console.log(sum(2, 5)) | |
// Summing Arbitatry Numbers | |
const sumArbitraryNums = () { | |
let sum = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Making API call | |
// Fetch API | |
fetch('http://example.com/huha.json') | |
.then(response => response.json()) | |
.then(data => console.log(data)); | |
// Example: Get languages from the countries API |