Back

Shubham

Fearless • 1m

Day 11/21 – JavaScript API Calls 🌐 Today I explored how to fetch data from APIs in JavaScript using async/await. Copy code Javascript async function getUsers() { try { let response = await fetch("https://jsonplaceholder.typicode.com/users"); let data = await response.json(); console.log(data); } catch (error) { console.error("Error:", error); } } getUsers(); šŸ”¹ Key points: fetch() → call APIs await → wait for response try/catch → handle errors gracefully APIs make our apps dynamic & real-time ✨ #21DayJavaScript #JavaScript #WebDevelopment #CodingJourney #LearnInPublic

Reply
2

More like this

Recommendations from Medial

Shubham

Fearless • 1m

Day 10/21 – JavaScript: Callback, Promise & Async/Await Today I learned how JavaScript handles asynchronous tasks like API calls, file loading, or timers. ⚔ šŸ”¹ Callback – a function passed into another function function fetchData(cb) { setTimeou

See More
Reply
1

Inayat Hasan

Software engineer • 1y

[This post has been deleted by the creator]

Reply
1
3

Rohit joshi

Dev dev dev • 8m

šŸš€ **Master Asynchronous Programming in C#** šŸš€ Asynchronous programming is a **must-have skill** for modern C# developers. Whether you're building APIs, working with databases, or handling real-time applications, understanding **async/await** can

See More
Reply

Souvik Paul

 • 

ZeroBizz • 5m

✨ Flutter Newbie? Let's build! First: Set up your environment. šŸ’» [flutter.dev/docs/get, started/install](https://flutter.dev/docs/get, started/install) šŸ“‚ Project time! flutter create my_app. Boom! Basic project ready. Explore the structure. šŸ¤” šŸŽØ

See More
Reply
1

Gigaversity

Gigaversity.in • 5m

What is an API? Have you ever ordered food at a restaurant? The internet works in a similar way! An API (Application Programming Interface) is like a waiter - it takes your request, delivers it to the kitchen (backend), and brings back the response.

See More
Reply
7

Arnav Aggarwal

Love to Code | React... • 7m

Ever had a friend join your trip after you’ve booked seats? šŸŽŸļø You’d call support šŸ“ž or tweak the booking. Without a system, it’d be chaos—miscommunication galore! In tech, APIs (Application Programming Interfaces) save us 🦸. They’re the internet’

See More
Reply
2
11

Sagar gupta

Full-time Freelancer... • 1y

Most Javascript Questions Asked in Interview | PART 2 1. What is difference between a for loop and for Each loop Ans: A for loop is traditional loop that uses a counter variable to iterate over an array. ForEach loop is a method that iterate over a

See More
Reply
3
10
Image Description

Ashutosh Jha

 • 

RE Eduversity • 1y

🌟 MERN Stack Essentials for 2024: šŸƒ MongoDB: It's a flexible NoSQL database. Great for dealing with lots of data! šŸš† Express.js: A lightweight framework that helps you build fast web applications. ✨ React: Create interactive UIs with this powerf

See More
1 Reply
2
6

Nikhil Kesharwani

SDE • 11m

JavaScript: The Language That Powers the Web JavaScript is more than just a programming language—it's the backbone of dynamic web development. Whether you're building interactive user interfaces, handling real-time data, or creating seamless web app

See More
Reply
4

Anubhav Sharma

Rooted in Linux. Dri... • 1m

šŸš€ Async Transformation Completed (Almost!) Recently converted a synchronous Hostinger software package into a fully asynchronous architecture using httpx.AsyncClient. šŸ“ˆ Performance Outcome: 4.34Ɨ faster compared to sequential execution Zero err

See More
Reply
1
1

Download the medial app to read full posts, comements and news.