Day 7: AWS Cloud Resume Challenge
After solidifying my JavaScript fundamentals, I realised something important: I don't need to finish a 40-hour JS tutorial before I start building. It was time to pivot to "Just-In-Time" learning and start writing the actual code for my resume!
Today, I officially created the JavaScript file for my project and connected it to my HTML.
The Setup:
Escaping Tutorial Hell Instead of blindly following generic lessons, I researched exactly what I needed to make a dummy visitor counter work locally.
First, I created a brand new script.js file.
Then, I learned how to properly link it by adding an external <script> tag right before the closing <body> tag of my index.html file.
The Action: Functions and the DOM
With the files connected, it was time to make them talk to each other. I didn't want to overcomplicate things, so my goal was simple: make JavaScript find the number 0 on my webpage and change it to 10.
Here is exactly how I did it:
The Target: I added a
<span>tagid="visitor-count"around the number 0 in my HTML.The Function: In my JS file, I wrapped my code inside a
functionso I could control exactly when it runs.The DOM: I used
document.getElementById()to reach into the HTML, grab that specific span element, and dynamically change the inner text to my test number.
The Big Win
Refreshing my browser and watching that 0 instantly change to a 10 completely via my own custom JavaScript logic was an incredible feeling! It proves that my files are communicating perfectly.
Up Next:
Right now, the counter is just a static, fake number. The next massive step is learning about the Fetch API and JSON so I can eventually make this local JavaScript talk to a real AWS database!
#javaScript #CloudResumeChallenge #WebDevelopment #DevOps #DOM
Comments
Join the discussionNo comments yet. Be the first to comment.




