🚀 Web Development Journey - JavaScript Day 5 Today I focused on understanding how JavaScript handles data using objects. Here’s what I covered: 🔹 Objects in JavaScript Creating and working with key-value pairs to structure data. 🔹 Nested Objects Storing objects inside objects for more complex data structures. 🔹 Object Methods Adding functions inside objects to perform actions. 🔹 this Keyword Understanding how to reference object properties within methods. It’s becoming clearer how JavaScript models real-world data and behavior. Next up: Constructor Functions 🔥 #WebDevelopment #JavaScript #100DaysOfCode #LearningInPublic #FrontendDevelopment
Learning JavaScript: Objects and Data Structures
More Relevant Posts
-
𝗧𝗵𝗲 𝗣𝗼𝘄𝗲𝗿 𝗢𝗳 𝗦𝗶𝗻𝗴𝗹𝗲-𝗧𝗵𝗿𝗲𝗮𝗱𝗲𝗱 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 You use JavaScript to build web applications. But do you know how it works? JavaScript is a single-threaded language. This means it executes one operation at a time on a single thread. Here's what you need to know: - JavaScript is single-threaded, but it can still handle asynchronous operations - It uses the event loop, callback queues, and asynchronous APIs to achieve non-blocking behavior - The event loop manages the execution of code, events, and messages in a non-blocking manner The event loop works like this: - JavaScript pushes the execution context of functions onto the call stack - When it encounters asynchronous operations, it delegates them to Web APIs or Node APIs - The event loop monitors the call stack and callback queue, pushing callbacks onto the call stack for execution You can see this in action with a simple example: ``` is not allowed, so here is the example in plain text: console.log("Start") setTimeout(() => { console.log("End") } This is how it works: - The first console.log("Start") is executed - The setTimeout() function is encountered and placed in the call stack - After 2 seconds, the callback function is moved to the callback queue - The event loop checks if the call stack is empty, then pushes the callback function onto the call stack for execution Source: https://lnkd.in/gtPp3Cvy
To view or add a comment, sign in
-
6 days ago I made a post on: 📌 "Something i figured in JavaScript today that A.I code misinterprets." I am about to share that now, pay close attention. As a developer using JavaScript, this is in connecting with the scopes of JavaScript. The Scope of JavaScript refers to the visibility of variable and functions within a program of codes. Which are: 1. Global scope: this variable is visible anywhere in the javascript program. 2. Function scope: this is a variable created when a function is declared and it's variable and functions are only visible withing that function. A sample of it is: Function funName(){ var fs = "..." alert (fs); console.log(fs); } funName(); Now looking at this, A.I codes misinterprets the function scopes and genrate codes that carries just global scopes or even most times Interchange function scopes with global scopes when giving a variable function. 📌 The risk of this common error in our program will not appear at the beginning of the project but during debugging and code maintenance. Wonder why JavaScript bugs gives you sleepless nights? This is one of the main reasons. This is a call for developers and vibe coders to learn the intimate differences between GLOBAL SCOPE VARIABLES and FUNCION SCOPE VARIABLES. You A.I JavaScript code can cause you harm later if you do not learn this earlier. 📌 A.I. frequently misunderstands Hoisting and the Temporal Dead Zone (TDZ) when creating nested functions. It often defaults to legacy var logic within closure loops (because the bulk of the training data still uses it) rather than modern let/const for block scoping. It optimizes for visual syntax, not runtime safety. Automation without technical intuition creates technical debt. Want more daily strategy from the cutting edge of web infrastructure? connect with snow works #WorksTechnology #JavaScriptMastery #CodingArchitecture #AIPerformance #TechnicalIntuition #WebArchitecture #SoftwareDesign #WebDevStrategy
To view or add a comment, sign in
-
-
🚀 Web Development Journey - JavaScript Day 6 Today was all about going deeper into how JavaScript creates and manages objects behind the scenes. Here’s what I learned: 🔹 Constructor Functions Creating multiple object instances efficiently. 🔹 Prototypes & Prototype Inheritance Understanding how JavaScript shares properties and methods across objects. 🔹 Changing Prototype Values Exploring how modifying prototypes affects all instances. 🔹 Object Destructuring Extracting values from objects in a cleaner, more readable way. This session really helped me understand how JavaScript works under the hood when dealing with objects. Next up: Object Literal Syntax Extensions (ES6) 🔥 #WebDevelopment #JavaScript #100DaysOfCode #LearningInPublic #FrontendDevelopment
To view or add a comment, sign in
-
-
🚀 Day 7 of My JavaScript Journey Today was all about mastering Arrays in JavaScript — one of the most powerful and commonly used concepts in web development 💻🔥 Here’s a quick breakdown of what I learned 👇 📌 What is an Array? Array is a collection of multiple values stored in a single variable. 📌 Basics Access elements using index Find length using .length Arrays can store different data types (heterogeneous) 📌 Mutability Arrays in JavaScript are mutable, meaning we can change their values anytime. 📌 Adding & Removing Elements push() → add at end pop() → remove from end unshift() → add at beginning shift() → remove from beginning ⚠️ Avoid shift() & unshift() in large arrays (performance issue) 📌 Loops for Iteration for loop → more control for...of loop → cleaner & easy 📌 Copying Arrays Copy by reference can cause unexpected changes 👉 Important concept to avoid bugs 📌 const with Arrays You can modify elements even if array is const But cannot reassign the whole array 📌 Array Methods slice() → creates a shallow copy splice() → modifies original array Spread operator ... → merge arrays 📌 Conversions & Searching Convert array to string Search using methods like includes() 📌 Sorting & Reversing Default sort works for strings ❗Fails for numbers → needs custom compare function Custom sorting for ascending & descending order 📌 Advanced Concepts Flatten nested arrays Arrays are actually objects in JavaScript 👉 That’s why they behave differently than "true arrays" in other languages 💡 Key Takeaway: Understanding arrays deeply is super important because they are used everywhere — from handling data to building real-world applications. 🔥 Slowly but consistently improving every day! #javascript #webdevelopment #mernstack #learninginpublic #day7 #codingjourney
To view or add a comment, sign in
-
-
💻 My JavaScript Learning & Projects Journey Today, I focused on JavaScript to enhance my web development and data handling skills. Here’s what I accomplished: DOM Manipulation – Learned to dynamically change content and styles on web pages. Event Handling – Practiced click, input, and submit events to make web pages interactive. Functions & Loops – Used functions, loops, and conditionals to automate tasks efficiently. Arrays & Objects – Managed data structures to store, access, and manipulate data effectively. Integration with HTML & CSS – Linked JavaScript with web pages to create responsive, interactive designs. Real-life Applications – Built small projects like interactive forms, dynamic tables, and charts. 💡 Key Takeaway: JavaScript brings static web pages to life and empowers interactive, user-friendly experiences. #JavaScript #WebDevelopment #CodingJourney #FrontendDevelopment #TechSkills #LearningByDoing
To view or add a comment, sign in
-
🔥 DAY 7 – Making Your Website Come Alive with JavaScript 🚀 So far, we’ve built a web page using HTML (structure) and CSS (style). But something is still missing… 🤔 👉 Interaction. Think of it like this: * HTML = Body 🧍 * CSS = Clothes & Appearance 👕 * JavaScript = Brain 🧠 Without JavaScript, your website just sits there. With JavaScript, it can respond, react, and interact 💥 💡 Simple Example Let’s make a button that does something when clicked 👇 ```html <!DOCTYPE html> <html> <head> <title>My First JavaScript Page</title> </head> <body> <h1>Welcome to My Website 🎉</h1> <p>This is getting more interesting 😎</p> <button onclick="showMessage()">Click Me!</button> <script> function showMessage() { alert("Hello! You're now using JavaScript 😁"); } </script> </body> </html> ``` 🧠 What’s happening here? * `<button>` → creates a button * `onclick="showMessage()"` → tells the button what to do when clicked * `<script>` → where JavaScript lives * `alert()` → shows a popup message ⚡ Before vs After JavaScript * ❌ Without JS → Button does nothing * ✅ With JS → Button responds instantly That’s the power of JavaScript 💪 🎯 Why this matters This is how apps like: * Login forms * Notifications * Chat apps * AI tools 🤖 …all come alive. 💭 Imagine PREP or Meta without JavaScript… no interaction, no feedback, no real experience. That’s why JS is a game changer 🔥 📌 Challenge for you today: Change the message inside the alert to something fun 😄 #Day7 #30DaysOfCode #LearnJavaScript #BuildInPublic #TechInAfrica #SoftwareEngineering #CodeJourney 🚀
To view or add a comment, sign in
-
-
Day 0 of 100 Days of JavaScript 🚀 Starting this challenge to build consistency and actually understand what I learn. Today: Type Conversion & Type Coercion JavaScript is a dynamically typed language, meaning variables don’t have fixed types—values can change type at runtime. 🔹 Type Coercion (Implicit / Automatic) JavaScript automatically converts types when needed. console.log(5 + "5"); // "55" console.log([] + {}); // "[object Object]" 👉 If one value is a string, JavaScript converts the other into a string and concatenates. 👉 Objects convert to a default string form → ""[object Object]"" 🔹 Type Conversion (Explicit / Manual) We manually convert types when we want control. Number("5"); // 5 String(5); // "5" Boolean(1); // true 👉 This is safer because we decide how the value should behave. ⚠️ Why this matters Type conversion looks simple but can lead to unexpected bugs if not understood properly. Understanding how JavaScript handles types = better debugging + cleaner code. Let’s see how far I can go with consistency.
To view or add a comment, sign in
-
Day 14/30 — JavaScript Journey JavaScript Closures 🤯 Hidden Superpower of JS Closures are where JavaScript goes from “basic” to “powerful.” ⚡ A closure happens when a function remembers variables from its outer scope — even after that outer function is done executing. 👉 Simple idea: A function carries its data with it, everywhere it goes 🎒 ⚡ Why Closures Matter • Data Privacy → Hide variables, expose only what’s needed • State Management → Remember values without globals • Core JS Power → Used in callbacks, event handlers, promises, React 🧠 Mental Model Function + its surrounding data = Closure Even if the outer function is gone, the inner one still has access. 🔥 Real Impact Without closures ❌ • Messy global variables • Hard-to-maintain code With closures ✅ • Clean architecture • Controlled data access • Modular, scalable code 🚀 One-Line Insight Closures turn functions into stateful, powerful building blocks 💬 If this clicked, you’re ahead of most developers Comment “CLOSURE” for a real-world example breakdown 👇
To view or add a comment, sign in
-
-
One JavaScript feature that quietly makes your code cleaner and safer: 👉 Optional Chaining (?.) Before: const city = user && user.address && user.address.city; Or worse… nested if checks everywhere. Now: const city = user?.address?.city; What’s actually happening? 👉 If anything in the chain is null or undefined, JavaScript just stops—and returns undefined instead of crashing. No more: “Cannot read property 'x' of undefined” It gets even better: user?.getProfile?.(); Calls the function only if it exists No more “is not a function” errors But here’s the part many people miss: 👉 Optional chaining hides errors if you overuse it If something should exist and doesn’t, ?. will quietly return undefined… and your bug becomes harder to notice. Rule of thumb: • Use ?. for optional data (API responses, external input) • Avoid it for required logic (core business rules) JavaScript gives you tools to write safer code. 👉 The real skill is knowing when not to use them. Do you use optional chaining everywhere—or selectively? #softwareengineering #javascript #codequality #webdevelopment
To view or add a comment, sign in
-
Most developers think they’re calling pure JavaScript functions. In reality, many of those calls aren’t JavaScript at all. This is where 𝗙𝗮𝗰𝗮𝗱𝗲 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 come in. In architecture, a facade is the simple front of a building—hiding the complex structure behind it. The browser follows the same principle. Functions like `setTimeout`, `fetch`, `document`, `localStorage`, and even `console.log` look like native JavaScript. But they’re actually **interfaces to browser Web APIs**. When you call them, JavaScript delegates the heavy lifting to systems outside the engine: * `setTimeout` → handled by the browser’s timer system * `fetch` → managed by the network layer * `document` → powered by the DOM engine One line of code… but an entire subsystem executes it. Interestingly, not all facade functions behave the same way. For example, `console.log` often executes immediately because debugging requires real-time feedback. Understanding this clears up a lot of confusion around async behavior and performance. It’s no longer “𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗺𝗮𝗴𝗶𝗰”—it’s system design. Here’s how to apply this knowledge: * Recognize which APIs are browser-provided vs pure JS * Don’t assume async behavior—understand how each API works * Use this mental model when debugging unexpected behavior Once you see it, JavaScript becomes far more predictable. Which Web API surprised you the most when you learned it wasn’t actually JavaScript? #JavaScript #WebAPIs #FrontendEngineering #AsyncProgramming #EventLoop #SoftwareEngineering #BrowserInternals #CleanCode
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