DEV Community

Cover image for Day 30 of learning MERN Stack
Ali Hamza
Ali Hamza

Posted on

Day 30 of learning MERN Stack

Hello Dev Community! ๐Ÿ‘‹

Today is a massive milestone for meโ€”it is officially Day 30! Exactly one full month ago, I committed to documenting my journey toward mastering the MERN stack every single day.

To celebrate this 1-month anniversary, I completed Lecture 11 (the final core track) of Apna College's JavaScript playlist with Shradha Didi and built a fully functional, live API Currency Converter Application!

I shifted from mock local datasets to connecting my frontend interface directly to the live internet using network requests.


๐Ÿง  Key Learnings From JS Lecture 11 (Fetch API)

I explored the core mechanics of how modern web applications talk to servers across the globe:

1. The fetch() API

I learned that fetch() is JavaScript's native tool used to make network requests to a server. It returns a Promise, which makes it perfect to combine with the async/await syntax I mastered on Day 29.

2. Understanding JSON & AJAX

When data comes back from a server API, it arrives as a raw string format called JSON (JavaScript Object Notation). I learned how to parse this data cleanly using the .json() method, which converts that raw string back into a usable JavaScript object instantly:


javascript
const URL = "[https://open.er-api.com/v6/latest/USD](https://open.er-api.com/v6/latest/USD)"; // Sample API URL
let response = await fetch(URL);
let data = await response.json(); // Parses the raw data packet
console.log(data);
Enter fullscreen mode Exit fullscreen mode

Top comments (0)