7 days ago I made a decision to stop being comfortable and start being consistent. Today I am finally showing up publicly for the first time. Today I read about Thorndike's cat experiment in Atomic Habits. He placed cats in a puzzle box and tracked how long they took to escape. First attempt: 160 seconds. After 20 trials: 6 seconds. No manual. No preparation. Just repeated attempts until the action became automatic. This morning I caught myself saying "I need to revise JavaScript before building anything." I ignored that thought and just opened VS Code instead. Got stuck. Googled it. Fixed it. Built a working Budget Tracker in vanilla JavaScript with DOM manipulation, event listeners, input validation and transaction history. The struggle was the learning. Also went deep into JavaScript type coercion today. Why typeof(5 * "JavaScript") returns NaN, how truthy and falsy values actually work, and why undefined, null, NaN and 0 all behave differently. These are the things that separate someone who writes JavaScript from someone who understands it. Solved 4 DSA problems alongside. Atomic Habits says habits free up mental space for harder problems. Every concept I understand deeply today is one less thing my brain has to think about tomorrow. Day 1 of showing up publicly. Let's see where Day 30 looks like. #100DaysOfCode #JavaScript #DSA #LearningInPublic #SoftwareEngineering
Breaking Through Consistency with JavaScript and DSA
More Relevant Posts
-
I spent hours stuck on a “simple” problem… sorting an array. No tutorial. No copy-paste. Just confusion, frustration, and trial & error. At first, nothing made sense: * Why isn’t my logic working? * Why do I need multiple loops? * Why does swapping break everything? But instead of escaping the discomfort… I stayed. I wrote it. Broke it. Rewrote it. Questioned everything. And then it clicked. I built my own custom sorting method (Bubble Sort) from scratch in JavaScript — not by memorizing, but by understanding. Biggest lesson from this: 👉 Real growth happens when you **sit with confusion instead of avoiding it 👉 Patience > Talent 👉 Struggle is not a sign of failure — it's the path to clarity Also learned: * Sorting is NOT about picking values, it's about **comparing & swapping repeatedly** * One pass is never enough — algorithms evolve step by step * Understanding beats memorization every single time Sharing my final implementation below👇 Course Instructor: Rohit Negi | Youtube Channel: CoderArmy #JavaScript #codiing #WebDevelopment #LearningInPublic #ProblemSolving #fullstackdevelopment
To view or add a comment, sign in
-
-
hi connections Day 22 of 30: Extending the Prototype with LeetCode 2619 🚀 Today’s challenge, Array Prototype Last, dives into one of JavaScript’s most powerful features: Prototypal Inheritance. Instead of writing a standard function, the task was to enhance the global Array object so that every array can call .last() to retrieve its final element. The Logic By adding a method to Array.prototype, we make it available to every array instance. Inside the function, the this keyword refers to the array itself, allowing us to access its length and indices. Key Takeaways: The "this" Context: Understanding how this refers to the calling object is crucial for building custom utilities. Edge Case Handling: In this problem, returning -1 for empty arrays is a specific requirement that differs from the usual undefined. Efficiency: Accessing an element by index is O(1), making this a lightning-fast operation regardless of array size. Customizing prototypes is a common practice in library development, and mastering it helps in writing cleaner, more intuitive code for complex applications. One more day down, more logic mastered! 💻✨ #JavaScript #LeetCode
To view or add a comment, sign in
-
-
🔥 I used to think I knew JavaScript… until I discovered this. Early in my career, I was constantly fighting weird bugs: Variables leaking everywhere Random overrides Code breaking for “no reason” Then I stumbled upon this pattern: (function () { console.log('This runs immediately'); })(); It’s called an IIFE (Immediately Invoked Function Expression). This one concept completely changed how I understood scope in JavaScript. Before let and const existed, IIFEs were the go-to solution because they allowed us to: ✅ Execute code immediately ✅ Create private scopes ✅ Prevent polluting the global namespace ✅ Avoid naming collisions It felt like having a private sandbox in your code. But here’s the interesting part 👇 Today, we rarely need IIFEs anymore. Modern JavaScript gives us much cleaner tools: Block scoping with let and const True modules with import / export Arrow functions + better patterns So why should you still care about IIFEs in 2026? Because understanding why they existed helps you truly understand how JavaScript evolved — and why it behaves the way it does. The best developers don’t just learn syntax. They learn the history and the problems each feature was solving. 🧠 My takeaway: Don’t just learn what to use today. Learn why it existed in the first place. That’s what separates good developers from great ones. Have you ever used IIFEs in old codebases? Or did you start learning JavaScript after modules became the standard? Drop a comment 👇 I’d love to hear your experience. #JavaScript #WebDevelopment #Frontend #Programming #CleanCode #Coding
To view or add a comment, sign in
-
-
𝐓𝐡𝐞 𝐜𝐚𝐥𝐥 𝐬𝐭𝐚𝐜𝐤 𝐡𝐚𝐬 𝐧𝐨 𝐩𝐚𝐭𝐢𝐞𝐧𝐜𝐞. 𝐈𝐭 𝐞𝐱𝐞𝐜𝐮𝐭𝐞𝐬 𝐞𝐯𝐞𝐫𝐲𝐭𝐡𝐢𝐧𝐠 — 𝐢𝐧𝐬𝐭𝐚𝐧𝐭𝐥𝐲, 𝐫𝐮𝐭𝐡𝐥𝐞𝐬𝐬𝐥𝐲, 𝐢𝐧 𝐨𝐫𝐝𝐞𝐫. So what happens when you need a 𝐝𝐞𝐥𝐚𝐲? That's where I hit a wall. If JavaScript is single-threaded and the call stack never pauses — how does '𝐬𝐞𝐭𝐓𝐢𝐦𝐞𝐨𝐮𝐭' even work? Turns out, it doesn't live in JavaScript at all. 𝐖𝐞𝐛 𝐀𝐏𝐈𝐬 — 𝐬𝐞𝐭𝐓𝐢𝐦𝐞𝐨𝐮𝐭, 𝐟𝐞𝐭𝐜𝐡( ), 𝐃𝐎𝐌 𝐞𝐯𝐞𝐧𝐭𝐬, 𝐥𝐨𝐜𝐚𝐥𝐒𝐭𝐨𝐫𝐚𝐠𝐞 — are gifts from the browser, not the language. The browser quietly hands them off, runs them in the background, then places the result into a 𝐂𝐚𝐥𝐥𝐛𝐚𝐜𝐤 𝐐𝐮𝐞𝐮𝐞 . And here's the elegant part: The 𝐄𝐯𝐞𝐧𝐭 𝐋𝐨𝐨𝐩 sits there, watching. The moment the call stack is empty, it picks up the waiting callback functions and pushes it in. That's it. No magic. Just a disciplined handoff between three moving parts. JavaScript doesn't wait — but the browser builds the patience "around" it. 𝐓𝐚𝐤𝐞𝐚𝐰𝐚𝐲𝐬 : → 𝐓𝐡𝐞 𝐜𝐚𝐥𝐥 𝐬𝐭𝐚𝐜𝐤 𝐞𝐱𝐞𝐜𝐮𝐭𝐞𝐬 𝐟𝐚𝐬𝐭. 𝐍𝐞𝐯𝐞𝐫 𝐚𝐬𝐬𝐮𝐦𝐞 𝐢𝐭 𝐰𝐚𝐢𝐭𝐬. → 𝐖𝐞𝐛 𝐀𝐏𝐈𝐬 𝐚𝐫𝐞 𝐛𝐫𝐨𝐰𝐬𝐞𝐫-𝐩𝐨𝐰𝐞𝐫𝐞𝐝, 𝐚𝐜𝐜𝐞𝐬𝐬𝐞𝐝 𝐯𝐢𝐚 𝐭𝐡𝐞 𝐠𝐥𝐨𝐛𝐚𝐥 "𝐰𝐢𝐧𝐝𝐨𝐰" 𝐨𝐛𝐣𝐞𝐜𝐭. → 𝐓𝐡𝐞 𝐞𝐯𝐞𝐧𝐭 𝐥𝐨𝐨𝐩 𝐨𝐧𝐥𝐲 𝐚𝐜𝐭𝐬 𝐰𝐡𝐞𝐧 𝐭𝐡𝐞 𝐜𝐚𝐥𝐥 𝐬𝐭𝐚𝐜𝐤 𝐢𝐬 𝐜𝐥𝐞𝐚𝐫. #JavaScript #SoftwareEngineering #DeveloperJourney #LearningInPublic #Programming #TechCommunity #WebDevelopment
To view or add a comment, sign in
-
-
🚀 Day 7 / 30 - JavaScript Coding Practice Today’s challenge: Recreating the Array.map() functionality — without actually using it 👀 Problem: Apply a transformation function to each element of an array and return a new array. 💡 Key Insight: This problem helped me understand what’s happening under the hood of built-in methods like map(). 👉 Instead of relying on .map(), I used a loop to: Iterate through each element Apply the given function with both value & index Build a new transformed array Solution: var map = function (arr, fn) { let transArr = [] arr.forEach((element, i) => { transArr.push(fn(element, i) ?? element); }); return transArr; }; #JavaScript #DSA #CodingPractice #100DaysOfCode #FrontendDevelopment #ProblemSolving
To view or add a comment, sign in
-
-
Day 01: Precision Matters 🔢 Kicking off my coding journey by tackling a classic: The Plus Minus Challenge. The Problem: Given an array of integers, calculate the ratios of positive numbers, negative numbers, and zeros. The catch? The output must be precise to six decimal places. The Solution: It’s all about iteration and formatting. By looping through the array and categorizing each element, we can determine the counts. The key to meeting the precision requirement in JavaScript is using the .toFixed(6) method. javascript function plusMinus(arr) { let n = arr.length; let positive = 0, negative = 0, zero = 0; for(let val of arr) { if(val > 0) positive++; else if(val < 0) negative++; else zero++; } console.log((positive/n).toFixed(6)); console.log((negative/n).toFixed(6)); console.log((zero/n).toFixed(6)); } plusMinus(arr); Key Takeaway: Even simple logic requires attention to detail—especially when it comes to floating-point precision! #CodingChallenge #JavaScript #ProblemSolving #100DaysOfCode #DataStructures
To view or add a comment, sign in
-
🚨 JavaScript finally started making sense after this… For a long time, I was just using functions in JS. But recently, I learned about: 👉 Scope 👉 Closures 👉 Higher Order Functions (HOF) And things clicked differently. 💡 Here’s what changed my understanding: ✅ Scope It’s not just about variables — it’s about where your code can access data ✅ Closures -> This blew my mind 🤯 A function doesn’t just execute… It remembers the environment where it was created. 👉 Even after the outer function is gone. ✅ Higher Order Functions Functions in JavaScript are not just “callable” They are: ✔ Passed as arguments ✔ Returned from other functions ✔ Stored like values 💡 The biggest shift for me: 👉 “Functions are not just actions, they are values with memory. They are first-class citizens in JavaScript” If you’re learning JavaScript: Don’t rush. These concepts feel hard at first… but once they click, everything changes. Course Instructor: Rohit Negi | Youtube Channel: CoderArmy. #JavaScript #WebDevelopment #Closures #fullstackdevelopment #LearnInPublic #coding
To view or add a comment, sign in
-
Most beginners fear async code… because it feels confusing and unpredictable. Promises, callbacks, delays — everything looks messy. But here’s the truth 👇 In 2026, real JavaScript power comes from Async/Await. It makes your code look simple… but work asynchronously behind the scenes. ⚡ No more callback hell. No more unreadable chains. With Async/Await you can: • Handle APIs smoothly • Write clean, readable code • Control execution step by step • Catch errors using try/catch easily Because modern JavaScript isn’t about writing complex code — it’s about writing clean async logic. Once you master this… you stop struggling with code, and start controlling it. 💻🔥 So ask yourself — are you still stuck in promises… or using async/await like a pro? #JavaScript #AsyncAwait #WebDevelopment #Coding #Programming #FrontendDevelopment #DeveloperLife #LearnToCode
To view or add a comment, sign in
-
-
I had this random thought while coding the other day… We’re always told primitives in JavaScript are “simple”, right? No methods. No properties. But then this works: "hello".toUpperCase() At first I was like… okay, JavaScript magic I guess 😅 Turns out, it’s not magic. Behind the scenes, JavaScript kind of “borrows” an object for a moment. When you call a method, it quietly wraps it like this: (new String("hello")).toUpperCase() The method runs → returns "HELLO" → then the object just disappears. Like it was never there. This is called autoboxing. Which explains why: - You can use methods on primitives - But you can’t actually store properties on them Try this: "hello".lang = "en" Looks fine… but nothing really gets saved. Because that “object” you were talking to? It’s already gone. I’ve been using JavaScript for a while, and only recently really thought about this 😅 What about you? Did you already know this, or just know about it? #JavaScript #FrontendDevelopment #WebDevelopment #JavaScriptTips #ProgrammingConcepts #Developers #SoftwareEngineering #Coding
To view or add a comment, sign in
-
👉 Read here: https://lnkd.in/gq5rHZxB 🚀 Synchronous vs Asynchronous JavaScript Understanding how JavaScript executes code is key to writing efficient and non-blocking applications. In this post, I break down: 🔹 What synchronous code means (step-by-step execution, blocking nature) 🔹 What asynchronous code means (non-blocking, background execution) 🔹 Why JavaScript needs async behavior 🔹 Real-world examples like API calls & timers 🔹 Problems caused by blocking code 🔹 Visual + intuitive diagrams (execution timeline & task queue) If you're learning JavaScript, this will help you build a strong mental model of how JS works behind the scenes. 🙏 Special thanks to 👉 Hitesh Choudhary Sir 👉 Piyush Garg Sir 👉 Chai Aur Code #JavaScript #WebDevelopment #AsyncJS #Coding #BackendDevelopment #FrontendDevelopment #LearnToCode
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