🚀Day 3 of My JavaScript Learning Journey Today I learned about something that looks simple but actually forms the backbone of how JavaScript handles variables — var, let, and const. Here’s what I understood 👇 🔹var → The old-school way. It’s function-scoped and can be redeclared or updated easily (sometimes too easily — which can cause bugs). 🔹let → The modern and safer option. It’s block-scoped and can be updated but not redeclared in the same scope. 🔹const → As the name says, it’s constant. Once assigned, its value cannot be changed or redeclared. Perfect for things that stay the same. 💡 My takeaway: Use let when the value might change, and const for everything else. Forget var — it belongs in history books now. 😅 Small concept, big impact. These little details are what make JavaScript more predictable and cleaner when we start writing real-world code. ➡️ The error in the image is because I have used the same name for variable in the code again. ➡️ I have used that name again by commenting the previous one. #JavaScript #WebDevelopment #LearningJourney #Frontend
Understanding var, let, and const in JavaScript
More Relevant Posts
-
As I continue learning JavaScript, I’m diving deeper into its core concepts. Today, I explored Hoisting, and it helped me understand how JavaScript handles code behind the scenes. What I learned about Hoisting: ~JavaScript moves variable and function declarations to the top of their scope before executing the code. This means: ~Functions can be called before they are declared ~Variables are initialized with undefined during the compilation phase ~Understanding execution context is crucial for clean and predictable code Why this concept is important? Hoisting may seem simple, but it forms the foundation of how JavaScript interprets code. It improves my understanding of: ~Execution phases ~Scope behavior ~Memory allocation ~Writing more structured and bug-free code My learning journey I’m currently focusing on strengthening my fundamentals concepts like: ~Hoisting ~Scope ~Closures ~Event loop ~DOM manipulation These basics are helping me build a strong foundation before moving toward frameworks and advanced topics. Every concept I learn brings me closer to writing cleaner, more efficient JavaScript. #JavaScript #LearningJourney #WebDevelopment #ProgrammingBasics #FrontendDeveloper
To view or add a comment, sign in
-
✨ Day [01] of My Learning Journey ✨ Today, I explored one of the most fundamental yet powerful concepts in JavaScript — Functions 💡 Here’s what I learned: 👉 A function is basically a reusable block of code that performs a specific task. 👉 It helps make code cleaner, modular, and easier to debug. 👉 You can create a function once and call it multiple times — super efficient! For example 👇 function greet(name) { console.log("Hello, " + name + "!"); } greet("Nikki"); // Output: Hello, Nikki! Then I also discovered arrow functions, which are a shorter and more modern way to write functions: const greet = name => console.log("Hello, " + name + "!"); I found this really interesting because arrow functions make the code more concise and look cleaner. 🚀 Small step today — but one more building block towards mastering JavaScript 💻 #90DaysOfCode #javascript #learning #webdevelopment #frontend #functions #growthmindset
To view or add a comment, sign in
-
🧠 JavaScript Concepts I Explored Today Today was a solid learning session — I spent time understanding how functions actually shape the logic in JavaScript. Here’s what I went through 👇 Functions and how they make code reusable First-class and higher-order functions (functions inside functions 🔁) Closures — the part where JS “remembers” variables even after execution IIFE — functions that run instantly (good for isolated scopes) Arrays — map, filter, reduce, forEach Objects — destructuring, looping, optional chaining These concepts connected so many dots for me. The more I write JavaScript, the more I realize how expressive it can be when you actually understand the “why” behind the syntax. #JavaScript #CodingJourney #WebDevelopment #Frontend #MERNStack
To view or add a comment, sign in
-
🚀 JavaScript Fun Fact that blew my mind! 😮 You might think setTimeout(fn, 0) means “run this instantly”, right? Well… JavaScript says — “Not so fast, my friend 😎” Let’s say you have a CPU-intensive task running right before your setTimeout. Even though you set it with 0 milliseconds, it doesn’t run immediately. Why? Because JavaScript is single-threaded! 🧠 Until that heavy task finishes, your poor setTimeout is stuck waiting in the callback queue, waving its hand like: “Hey, I was supposed to go at 0 ms! Anyone?? 😭” So the next time your code doesn’t “timeout” when you think it should — it’s not a bug… It’s the event loop doing its thing 🌀 💡 Lesson: Even setTimeout(fn, 0) doesn’t mean right now — it means as soon as the current thread is free! Have you ever faced this in your code — where your “instant” callback wasn’t so instant? Drop a ⚡ in the comments if you’ve been there! #JavaScript #WebDevelopment #CodingHumor #FrontendDevelopment #TechEducation #ProgrammingFun #LearnToCode #CodeNewbie #DeveloperCommunity #100DaysOfCode
To view or add a comment, sign in
-
Day 28 of learning JS and honestly it's clicking more now 🚀✨ Today I figured out how to actually create elements on a webpage using JavaScript 💻🔧. Learned two different ways to add content — dot notation and createTextNode() 📝✍️. Both work, but createTextNode() is kind of the more "proper" way I guess 😅🤔. Also realized that most devs use setAttribute() instead of dot notation when setting attributes ⚙️🎛️. Makes sense now that I think about it — it's way cleaner and easier to maintain 🎯✅. These DOM manipulation skills are actually going to be super useful 🔥💪. Can't wait to build something interactive with this stuff 🎮🎨. Shoutout to anyone else grinding through the basics — it gets better 💯🙌. Just gotta keep showing up 📈⬆️. #JavaScript #WebDevelopment #LearningToCode #100DaysOfCode #DevJourney #CodingLife #FrontendDevelopment #DOM #WebDesign #BeginnerDeveloper #CareerChange #TechJourney #CodeNewbie #ProgrammingCommunity #DailyLearning #WebDeveloper #CoderLife #TechSkills #LevelUp #KeepCoding 🚀💻📚✨🔥💡🎯💼👨💻🌟⚡🎓🚀🔮💎🎪🎭
To view or add a comment, sign in
-
-
🚀 Leveling up my JavaScript skills! Today I practiced some advanced JavaScript concepts — closures, rest operator, array methods (forEach, map, reduce, filter) — and built mini-functions to strengthen my logic. 💡 Key takeaway: Arrow functions + rest operator make your code clean and scalable. Array methods like map, reduce, filter + closures help solve real-world problems efficiently. I’m documenting my 60-day JavaScript challenge to keep learning and grow my network. 💻 You can also check my **public coding diary** on GitHub: https://lnkd.in/ge6G2yk5 💬 Let’s connect! If you’re into JS, share your favorite JS trick or function — I’d love to learn from you! #JavaScript #WebDevelopment #100DaysOfCode #CodingChallenge #FrontEndDeveloper #LearningInPublic #MERNStack
To view or add a comment, sign in
-
Hi everyone! I'm excited to share one of the best resources I’ve found for deepening my understanding of JavaScript. I stumbled upon a YouTube playlist (link below) that helped develop a unique perspective on how JavaScript works under the hood. 👉 YouTube Playlist: Dive into JavaScript Fundamentals https://lnkd.in/gARReDhs Before watching this series, I felt comfortable writing syntax and building UIs, but this playlist really helped me step back and really see why some patterns exist. Some of the things I learned were understanding closures and scopes as tools for structuring code and managing state, and not some "odd rule" to follow. Alongside learning what asynchronous behavior is and how the event loop work, I really enjoyed recognizing patterns over libraries and spending time understanding core JS. It finally gave me confidence to evaluate frameworks rather than rely on them blindly. If you’re learning JavaScript or brushing up before diving into full-stack work, I highly recommend giving this a look. 🔗 Feel free to share or comment if you’ve found other resources that helped you learn a concept . #JavaScript #WebDevelopment #LearningToCode #SoftwareEngineering #TechGrowth
To view or add a comment, sign in
-
I used to spend hours watching JavaScript tutorials... But when I opened VS Code — I blanked out. No clue where to start. No idea why my code wasn’t working. Sound familiar? 👇 That’s when I realized — I wasn’t learning. I was just consuming. Here are the 3 mistakes that slowed my JS progress: ❌ 1. Watching too many tutorials. They made me feel productive, but I wasn’t building anything. ❌ 2. Ignoring the console. Debugging felt “scary” until I realized console.log() is my best teacher. ❌ 3. Jumping into big projects too early. I was skipping the small stuff that actually builds understanding. Now, my rule is simple: 🎯 One concept → One small project. Since then, I’ve learned faster, debugged better, and started thinking like a developer — not just typing code. Tutorials teach you to follow. Projects teach you to think. So stop passively watching. Start actively building. That’s how you master JavaScript 🚀 #javascript #webdevelopment #frontend #reactjs #learninginpublic #100DaysOfCode #growthmindset
To view or add a comment, sign in
-
-
Weekly Learning Update 🚀 | Advanced JavaScript Hey everyone! This week, I took my JavaScript journey to the next level by diving into Advanced JavaScript concepts. The first chapter I tackled was all about Scope, Execution Context, and Closures—some of the most important (and sometimes tricky!) topics in JS. Here’s what I learned: Variable Scope: Explored the differences between global, block, and functional scope, and how they affect variable accessibility. Execution Context: Understood the two phases—memory creation and execution phase—and how JavaScript manages code behind the scenes. Lexical Scope vs Dynamic Scope: Learned how JavaScript determines variable scope using lexical (static) scoping, and how it’s different from dynamic scope. Closures: Finally got a clear definition of closures and saw how variables are preserved even after a function has finished executing. To put these concepts into practice, I also created some small projects based on everything I’ve learned so far. I’ll be sharing more about these projects soon—stay tuned! If you have any tips, resources, or interesting use-cases for closures and execution context, I’d love to hear from you! #LearningJourney #JavaScript #WeeklyUpdate #ContinuousLearning #AdvancedJavaScript
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development