Today was my first real step into the world of JavaScript, and honestly… it felt like opening a door to a whole new universe. I watched a 2hour tutorial, and even though it was long, I actually understood a lot of things. Here’s my simple breakdown of what I learned, in a way even a kid could understand
JavaScript: What I Found Out
One of the first things I learned is that JavaScript is a very powerful and widely used programming language. It helps websites come alive and become more fun and interactive.
If a website does something when you click or type: that’s JavaScript behind the scenes.
I also learned about IDEs (places where you write your code). The one we used was VS Code, which becomes even cooler when you add some extensions like:
Live Server – lets you see your website update instantly.
GitHub Theme – just makes VS Code look nicer.
JavaScript Code Snippets – helps you write code faster.
Prettier – keeps your code neat and tidy.
And yes, I learned that JavaScript files always end with ".js".
So a file like script.js is a JavaScript file.
Linking JavaScript to HTML
I also learned that JavaScript doesn’t always live inside the HTML file.
You can keep it in a separate .js file and link it like:
But if you don’t want a separate file, you can just write your JavaScript inside the HTML between:
"<script>
// your code here
</script>"
Simple and clean.
**Variables**
We started with variables, which I like to think of as little boxes where you store information.
You can keep numbers, text, or anything you want inside these boxes.
Example:
Let age = 20;
Here, age is the box, and 20 is what we put inside.
**Datatypes**
Then we moved into datatypes, which basically tell JavaScript what kind of thing is inside the variable.
Some types we learned:
*Number
*Boolean (true/false)
*String (text)
We also played with relational and equality operators — things like <, >, ==, ===, etc.
**Strings**
Strings were actually fun because they’re just text, and we did a bunch of things with them:
Concatenation — joining strings together.
Append — adding more text at the end.
Changing cases — like making everything UPPERCASE or lowercase.
Slice — cutting out a part of a string.
Split and Join — breaking a string apart and putting it back together again.
**Type Conversion**
This part showed me how to change one datatype to another.
Like turning a number into a string or a string into a number.
It’s like telling JavaScript, “Hey, treat this thing differently now.”
**Control Flow**
Next up was control flow, which basically means “deciding what the program should do next.”
We learned:
*If & Else
This lets the program make decisions.
If (age > 18) {
Console.log(“You’re an adult”);
} else {
Console.log(“You’re not an adult yet”);
}
*Switch
Another way to handle different options.
**Loops**
Loops were actually cool because they tell the computer to repeat something without us writing it many times.
We learned:
For loop
While loop
Do…while loop
A simple loop example:
For (let i = 1; i <= 5; i++) {
Console.log(i);
}
This prints 1 to 5 without me typing five separate console.log lines.
**Final Thoughts**
Overall, today’s session taught me that JavaScript is not as scary as it looks.
It’s actually fun,like teaching a computer how to think step-by-step.
I’m still a beginner, but I’m proud of what I learned.
Can’t wait to see what’s next on this journey.
Top comments (0)