🚀 Day 38 of #100DaysOfWebDevelopment Challenge Continuing my JavaScript journey, today I explored some essential fundamentals that strengthen the base of writing clean, readable, and efficient code. 🔹 Identifiers and Naming Conventions I learned the rules for creating identifiers in JavaScript — how variable and function names must start with a letter, underscore _, or dollar sign $, and cannot contain spaces or reserved keywords. I also explored different naming conventions that make code more readable: camelCase → used for variables and functions (e.g., userName) snake_case → often used in databases (e.g., user_name) PascalCase → generally used for class names (e.g., UserProfile) 🔹 Booleans in JavaScript I studied the boolean data type, which represents two values: true or false. Booleans are especially important in decision-making and control flow statements. 🔹 TypeScript Introduction I also got a brief introduction to TypeScript, a superset of JavaScript that adds static typing and helps developers catch errors during development rather than at runtime — improving reliability and scalability of large projects. 🔹 Strings in JavaScript Today I also explored strings, one of the most common data types used to represent text. I learned about string indices, which help access characters at specific positions, and about concatenation, which combines multiple strings using the + operator or template literals. 🔹 Null and Undefined Finally, I understood the difference between null and undefined — null is an intentional absence of value. undefined means a variable has been declared but not assigned any value. 💡 Insight: Mastering these foundational concepts ensures better code readability, structure, and debugging efficiency. It’s the small details that make a big difference in writing professional JavaScript code. #100DaysOfCode #WebDevelopment #JavaScript #FrontendDevelopment #LearningInPublic #CodingJourney
Day 38: JavaScript Fundamentals and TypeScript Introduction
More Relevant Posts
-
🚀 Understanding Lexical Scoping & Closures in JavaScript If you really want to master JavaScript, you must understand Lexical Scoping and Closures — two powerful concepts that define how your code thinks and remembers. 💭 🧠 Lexical Scoping It determines where your variables are accessible. In JavaScript, every function creates its own scope — and functions can access variables from their own scope and the scope where they were defined, not where they were called. That’s why JavaScript is said to be lexically scoped — the position of your code during writing decides what variables a function can access. 🔒 Closures A closure is when a function “remembers” the variables from its outer scope even after that outer function has returned. It’s what allows inner functions to keep their private data alive, long after the parent function finishes executing. Closures enable data privacy, state preservation, and function factories — powering everything from event handlers to module patterns. 🧩 Example Insight: In a nested function setup, if inner() still accesses count after outer() has returned, you’re witnessing closure magic in action! 💡 Pro Tip: Closures are not just theory — they’re behind: Private variables in JavaScript Real-time counters and timers Function currying React hooks (like useState!) Mastering them transforms you from writing code… to understanding how JavaScript actually works under the hood. 📚 Why It Matters Lexical scoping defines where you can access data. Closures define how long that data can live. Together, they form the core foundation of functional programming and modern frameworks like React and Node.js. 💬 Question for You Have you ever used closures intentionally in your projects — maybe for a counter, a module, or a hook? Share your example below 👇 Let’s help more devs understand these hidden superpowers of JS! 🔖 Hashtags #JavaScript #WebDevelopment #Closures #LexicalScope #FrontendDevelopment #Coding #JSConcepts #WebDevCommunity #LearnToCode #CodeNewbie #ProgrammingTips #100DaysOfCode #DeveloperJourney #SaadArif
To view or add a comment, sign in
-
-
Day 73 of #100DaysOfCode Today I dove into Object-Oriented JavaScript specifically Classes and the this keyword. In JavaScript, a class is like a blueprint for creating multiple objects with shared structure and behavior. It can include: A constructor() → initializes properties Methods → define actions for class instances Example: class Dog { constructor(name) { this.name = name; } bark() { console.log(`${this.name} says woof!`); } } const dog = new Dog("Gino"); dog.bark(); // Gino says woof! Here, this refers to the current object instance. In methods, it gives access to that object’s properties and behaviors. Key takeaways 🧠 Classes make code reusable and modular. this ensures context, it points to who is calling the method. Arrow functions don’t create their own this; they inherit from their scope. Mastering these two concepts is a huge step toward writing cleaner, scalable JavaScript.
To view or add a comment, sign in
-
🤖 Day 4 of my 7-Day JavaScript Revision Challenge! Today’s focus: Functions, Callbacks & Higher-Order Functions in JavaScript Functions are the engines of JavaScript. They help break complex problems into clean, reusable, and efficient pieces — improving readability, modularity, and overall code quality. ⚙️✨ 📚 1. Function Basics 🔹 Functions group logic into reusable blocks 🔹 Accept inputs as parameters 🔹 Return meaningful outputs 🔹 Help structure repeated tasks and calculations ⚡ 2. Arrow Functions 🔹 Short, modern, and cleaner syntax 🔹 Commonly used in callbacks 🔹 Great for writing compact, expressive logic 🔁 3. Callback Functions 🔹 A function passed as an argument into another function 🔹 Essential for async tasks, event handling, array methods 🔹 Provides more flexibility and control 🧠 4. Higher-Order Functions 🔹 Functions that take or return other functions 🔹 Core concept in functional programming 🔹 Common examples: handling lists, transforming data, pipelines 📝 5. Practice Challenges ✅ Create a function that returns the square of a number ✅ Convert an array of names to uppercase using a function ✅ Build a reusable greeting function ✅ Use a callback inside a custom function ✅ Transform a list of numbers into their cubes 🔥 Key Takeaway Functions are the backbone of JavaScript. Understanding how they work makes your code cleaner, faster, and more professional. 💪💡 🚀 Up next — Day 5: ES6+ Features! #JavaScript #WebDevelopment #CodingJourney #DeveloperCommunity #ProgrammingLife #WomenWhoCode #100DaysOfCode #FrontendDevelopment #LearningEveryday #SoftwareEngineering #TechLearning #JavaScriptDeveloper #CodeNewbie #Functions #Callbacks #HigherOrderFunctions #JSRevision #DailyCoding #AmanCodes #JSChallenge #7DaysOfCode #TechCommunity #BuildInPublic #SelfImprovement #CodeWithAman #StudyWithMe #LearnToCode
To view or add a comment, sign in
-
-
🚀 Mastering Promise Static Methods in JavaScript! 💡 As developers, asynchronous operations are everywhere — API calls, file uploads, database queries, and more. Promises make handling them elegant, and their static methods make it powerful. Here’s a quick breakdown of what I learned while exploring the Promise static methods 👇 🔹 Promise.resolve() — Converts any value to a Promise and helps start async chains smoothly. 🔹 Promise.reject() — Forces an error intentionally to handle invalid input or simulate failures. 🔹 Promise.all() — Runs multiple async tasks in parallel — perfect for fetching multiple APIs. 🔹 Promise.race() — Returns whichever promise settles first — great for timeout handling or fastest response wins. 🔹 Promise.allSettled() — Waits for all promises to settle (fulfilled or rejected) — useful for batch processing or partial success handling. 🔹 Promise.any() — Resolves on the first successful result — ideal for redundant API calls or fallback strategies. 🔹 Promise.withResolvers() — Lets you manually control when a promise resolves or rejects — super handy for event-driven or test scenarios. 🧠 Each of these has unique use cases — from managing multiple APIs efficiently to handling errors gracefully in real-world applications. 💻 I’ve compiled these notes into a structured PDF to make learning easier — check out “Promise Static Methods in JS” to strengthen your async skills! #JavaScript #WebDevelopment #AsyncProgramming #Promises #FrontendDevelopment #LearningJourney
To view or add a comment, sign in
-
🍏 JS Daily Bite #7 🧬 JavaScript Inheritance: Understanding the Prototype Chain JavaScript's approach to inheritance is unique — and understanding it is key to mastering the language. 🚀 What is the Prototype Chain? JavaScript objects are dynamic collections of properties ("own properties"). But here's where it gets interesting: every object also has a link to a prototype object. When you try to access a property, JavaScript doesn't just look at the object itself — it searches up the prototype chain until it either finds the property or reaches the end of the chain. 🧩 🔑 Key Concepts to Know: [[Prototype]] is the internal link to an object's prototype, accessible via Object.getPrototypeOf() and Object.setPrototypeOf(). Don’t confuse obj.__proto__ with func.prototype — the latter specifies what prototype will be assigned to instances created by a constructor function. In object literals, you can use { __proto__: c } to set the prototype directly. 🧠 The “Methods” Twist: JavaScript doesn’t have methods in the traditional class-based sense. Functions are just properties that can be inherited like any other. And here's a critical detail: when an inherited function executes, this points to the inheriting object — not the prototype where the function is defined. ⚡ 💡 Why This Matters: Understanding prototypes is essential for working with JavaScript's object model, debugging inheritance issues, and leveraging modern class syntax (which is really just syntactic sugar over prototypes). 👉 Next up: Constructors — how JavaScript creates and links objects during instantiation! #JavaScript #JSDailyBite #WebDevelopment #Programming #FrontendDevelopment #SoftwareEngineering #LearnToCode #TechEducation #CodeNewbie #Developers #100DaysOfCode
To view or add a comment, sign in
-
Most beginners write messy if-else logic — pros don’t. In JavaScript, mastering conditional statements means writing logic that’s not just functional, but readable and scalable. This post breaks down every major pattern: 1. if / else / else if 2. switch 3. ternary operator 4. logical & short-circuit operators 5. optional chaining and nullish coalescing real-world validation and role-based logic Want to level up your JavaScript readability game? Share the worst if-else chain you’ve ever written. https://lnkd.in/dVuD2ZWq #JavaScript #WebDevelopment #CodingTips #FrontendDev #ProgrammingBasics #LearnToCode #Nextjs #MERNStack
To view or add a comment, sign in
-
🚀 Mastering JavaScript String Methods Understanding String Methods is one of the fastest ways to level up your JavaScript skills. From searching, slicing, trimming, transforming text — string functions make data handling super easy and powerful. This chart gives a quick snapshot of commonly used methods like: ✔️ charAt() ✔️ concat() ✔️ startsWith() / endsWith() ✔️ includes() ✔️ indexOf() ✔️ slice() / substring() ✔️ match() ✔️ replace() ✔️ repeat() ✔️ trim() ✔️ toLowerCase() / toUpperCase() … and more! 📌 If you're learning JavaScript or improving your frontend skills, mastering these methods is a must. 💡Pro tip: Don't just memorize these - practice them in small projects to build muscle memory. #JavaScript #WebDevelopment #Coding #Frontend #Learning #StringMethods #MERNStack #JavaScriptTips
To view or add a comment, sign in
-
-
Understanding Execution Context in JavaScript If you’ve ever wondered how JavaScript actually runs your code behind the scenes, why variables are hoisted, how this behaves differently, or what makes closures possible, it all comes down to one thing: Execution Context I’ve broken down this concept step by step in my latest blog post, from Memory Creation Phase and Code Execution Phase to Call Stack, Lexical Environment, and this Binding, explained in a clear, beginner-friendly way. This concept completely changed the way I think about JavaScript execution flow. A big shoutout to Akshay Saini 🚀 his Namaste JavaScript YouTube series made these core fundamentals click for me. If you’re learning JavaScript or aiming to strengthen your core concepts, this is a must-read (and a must-watch). I’ve also started a complete Web Development Blog Series, a professional, step-by-step guide to mastering HTML, CSS, JavaScript, React, Node.js,Epress.js, MongoDB and Next.js. If you’re on your journey to becoming a full-stack developer, this series is for you. 👉 Read the full blog here: https://lnkd.in/dzeZG3nt 📺 Watch Akshay’s Namaste JavaScript series for deep understanding. #JavaScript #WebDevelopment #Learning #FrontendDevelopment #ExecutionContext #NamasteJavaScript #AkshaySaini #CodingJourney #JSBasics #TechBlog #MERNStack
To view or add a comment, sign in
Explore related topics
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