Back

Shubham

Fearlessย โ€ขย 19h

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ย โ€ขย 9d

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ย โ€ขย 6m

๐Ÿš€ **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ย โ€ขย 3m

โœจ 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

Arnav Aggarwal

Love to Code | React...ย โ€ขย 6m

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

Gigaversity

Gigaversity.inย โ€ขย 4m

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

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ย โ€ขย 9m

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
Image Description

Nandha Reddy

Cyber Security | Blo...ย โ€ขย 4m

๐Ÿ’ก Ever Wondered Why Apps Like Rapido Might Incur Costs for Your Searches? Every time you open an app like Rapido and input your pickup and destination locations, the app communicates with external services to fetch route details, estimated times, a

See More
2 Replies
2
10

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