After ~2.5 months of inconsistency, I finally sat down to code today. But this time I’m doing it differently: Not “learn a new syntax and move on.” Instead: train logic, build thinking, sharpen tools. Today’s focus: reversing a string — not once, but in multiple styles. Why? Because the same problem solved in different ways builds real depth. But the biggest win wasn’t even the logic — It was discovering how to streamline my workflow: 👉 I set up VS Code so I can run my JS file fresh every time just by pressing Ctrl + S. Now every save = instant execution in the terminal. No clicking, no re-running, no friction. Small setup improvement → massive boost in momentum. #javascript #learninginpublic #webdevelopment #problemsolving #100daysofcode
Reversing a string in multiple styles to build depth and streamline workflow
More Relevant Posts
-
“A ‘for’ loop that forgot to fill its blanks 🧩” I’ve always been fond of empty statements, but this time, I found something even more curious — An empty expression inside a for loop! 🤯 We’re all familiar with loops like this 👇 for (let i = 0; i < 5; i++) { console.log(i); } But did you know JavaScript allows a loop to run even when one of its expressions is completely missing? 😮 For example 👇 let i = 0; for ( ; ; ) { if(i==5){ break; } console.log(i++); } Here’s why this works so beautifully 🔍👇 👉 1️⃣ Flexible structure: The for loop doesn’t require all three expressions — initialization, condition, and increment are optional. 👉 2️⃣ Power of control: You can move parts like initialization or increment outside or inside the loop body — giving you freedom to control logic more precisely. 🧠 👉 3️⃣ Clarity through simplicity: By skipping the increment part, your focus is solely on the condition. This makes the loop’s intent clearer and the code cleaner — a real example of “Less is more.” 💡 So next time you spot a for loop with an empty expression, don’t rush to call it incomplete — it might just be showing you that silence in code can still speak logic! 😎 #JavaScript #ForLoop #CodingTips #WebDevelopment #CleanCode #ProgrammingHumor #DevelopersCommunity #LearnJavaScript #CodeWisdom
To view or add a comment, sign in
-
It’s not always the complex algorithms that break systems , sometimes it’s a single misplaced string. The smallest things in code often make the biggest impact. That’s the difference between something that works and something that’s well-engineered. I wrote a short blog about one of those small but important habits avoiding “magic strings” in code. 🪄 “The Problem with Magic Strings - and How to Avoid Them” Read it here 👉 https://lnkd.in/gQUBC3TS #CleanCode #SoftwareEngineering #JavaScript #CodingBestPractices #DeveloperMindset #Maintainability
To view or add a comment, sign in
-
When everything else fails in 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁… Try going back to the basics 👇 I spent today revising some core concepts and honestly, it reminded me how small fundamentals make big differences in coding: 𝟭. 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿𝘀 𝗮𝗿𝗲𝗻’𝘁 𝗷𝘂𝘀𝘁 𝘀𝘆𝗺𝗯𝗼𝗹𝘀. They decide how your code thinks and reacts from arithmetic (+, -, %) to logical (&&, ||). 𝟮. 𝗛𝗼𝗶𝘀𝘁𝗶𝗻𝗴 𝗶𝘀𝗻’𝘁 𝗺𝗮𝗴𝗶𝗰, 𝗶𝘁’𝘀 𝗼𝗿𝗱𝗲𝗿. var gets hoisted (declared but undefined), let and const are hoisted too but live in a “temporal dead zone.” 𝟯. 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 𝗹𝗼𝘃𝗲 𝘁𝗵𝗲 𝘀𝗽𝗼𝘁𝗹𝗶𝗴𝗵𝘁. Declarations are hoisted fully. Expressions? Not so much & they wait for their turn! It’s wild how a simple console.log() before a variable can teach you why order matters in JavaScript. Besides... When did debugging become about guessing? 😄 It’s really about understanding how JavaScript reads your code line by line. 𝗣.𝗦. Which JavaScript concept confused you most when you started? #Frontend #Webdevelopment #Javascript #Developer #Cohort2 #Learningjourney #Fundamental
To view or add a comment, sign in
-
-
🤯 Why is my async code not waiting inside forEach? I ran into this classic JavaScript trap last week. I needed to process a list of items one by one, each with an async operation: items.forEach(async (item) => { await processItem(item); }); console.log("All done!"); But… the log appeared before the processing finished. Even worse — some async calls overlapped unpredictably. 🧠 What’s actually happening? forEach doesn’t await the async callbacks you pass to it. It just runs them and moves on, without waiting for any of them to finish. So, console.log("All done!") runs immediately, not after everything is processed. ✅ The Fix If you need sequential async execution: for (const item of items) { await processItem(item); } console.log("All done!"); Or, if you want parallel execution: await Promise.all(items.map(processItem)); console.log("All done!"); 💡 Takeaway > forEach + async/await ≠ sequential execution. Use for...of for sequence, or Promise.all for parallelism. 🗣️ Your Turn Have you ever hit this bug while handling async tasks? Do you usually go for Promise.all or handle things one by one? #JavaScript #AsyncAwait #WebDevelopment #CodingTips #ES6 #FrontendDevelopment #DeveloperCommunity #CleanCode #ProgrammingInsights
To view or add a comment, sign in
-
-
💻 For Developers Who Love Control: Defining Recurrent Tasks via Code In Tasks Diary, not every feature is built just for everyday users — some are made for developers who want precision, logic, and full control. This part of the project allows you to define recurrent tasks using plain JavaScript and jQuery loops. You can: Programmatically generate child tasks 🧩 Adjust moments intelligently (e.g. skip weekends) Validate or run the JS code directly from the interface Count or delete tasks within chosen date ranges It’s like writing your own automation logic — but inside a productivity tool. Because sometimes, the best way to describe your workflow… is through code. Creating this system reminded me that building complex tools alone isn’t about speed — it’s about structure, patience, and clarity of thought. Bridging creativity and computation. ⚙️ #TasksDiary #SoftwareDevelopment #Productivity #Automation #WebApp #Coding #JavaScript #SoloDeveloper #IndieDev
To view or add a comment, sign in
-
-
🧠 Mastering Logical Operators in JavaScript Whether you're debugging conditions or building smarter workflows, understanding logical operators is a must for every developer. Here’s a quick breakdown: 🔹 && (AND): All conditions must be true 🔹 || (OR): At least one condition must be true 🔹 ! (NOT): Inverts the boolean value 🔹 ?? (Nullish Coalescing): Returns the right-hand value if the left is null or undefined 💡 Example: const user = null; const name = user ?? "Guest"; // Output: "Guest" These operators are the backbone of decision-making in JavaScript. Whether you're validating forms, controlling access, or setting defaults—logic matters. 👨💻 Tip for beginners: Practice with real-world scenarios like login checks, feature toggles, or fallback values. #JavaScript #WebDevelopment #CodingTips #LogicalOperators #FrontendDev #TechLearning #AsifCodes
To view or add a comment, sign in
-
📘 Day 175 of #200DaysOfCode Today, I explored how to count the number of properties in a JavaScript object — a small but meaningful step toward understanding how objects truly work under the hood. 🧠 Key Concepts Practiced • Working with objects • Looping through keys using for...in • Using hasOwnProperty() to avoid inherited keys • Returning calculated output 🌍 Real-World Uses ✅ Validating form inputs ✅ Checking JSON response structures ✅ Data integrity checks ✅ Object analysis in APIs 🔎 Learning takeaway: Even the simplest operations help you develop a deeper understanding of core JavaScript behavior. Mastering the fundamentals builds confidence for tackling complex problems later. #JavaScript #Day175 #175DaysOfCode #ProblemSolving #CodingChallenge #WebDevelopment #LogicBuilding #BackToBasics #LearnInPublic #DeveloperJourney #CodingMindset
To view or add a comment, sign in
-
-
Day 9 of #30DaysOfJavaScript: Mastering Function Execution Control with Closures! 🔐 Today I solved an interesting problem that pushed me to create a function wrapper called once. This wrapper ensures the original function runs only one time, no matter how many times it’s called afterwards—any further calls simply return undefined. This challenge deepened my understanding of JavaScript closures and how they can be used to preserve state and control function execution flow. Here’s my implementation: javascript function once(fn) { let called = false; let res; return function(...args) { if (!called) { called = true; res = fn(...args); return res; } return undefined; }; } Why this matters: Enables safer function calls by preventing unintended multiple executions. Useful pattern in scenarios like event handling, API calls, or initialization. Showcases how closures can encapsulate state elegantly in JavaScript. Excited to keep building on these foundational concepts and to see what Day 10 has in store! If you're on a similar learning path, let’s connect to share insights and grow together. #JavaScript #Closures #FunctionalProgramming #LeetCode #CodingChallenge #WebDevelopment #SoftwareEngineering #LearningJourney
To view or add a comment, sign in
-
-
🚀 I used to think JavaScript was just “interpreted”… Until I discovered how much magic happens before a single line runs. When you write something simple like let sum = 10 + 5, the JS engine doesn’t just read it; it compiles it. Yes, JavaScript is compiled before execution (just-in-time). ⚙️ Here’s what actually happens behind the scenes: 1️⃣ Tokenization – your code is broken into keywords, operators, and identifiers. 2️⃣ Parsing – those tokens form an Abstract Syntax Tree (AST) that maps out the structure of your program. 3️⃣ Interpretation – the AST is turned into bytecode. 4️⃣ JIT Compilation – engines like V8’s TurboFan optimize bytecode into fast machine code. 5️⃣ Garbage Collection – memory is automatically cleaned up when no longer needed. All of this happens in milliseconds ⚡ Every single time your JS runs. I broke down each step in detail in my new Medium article 👇 👉 https://lnkd.in/dM7yNH6f #JavaScript #WebDevelopment #Programming #NodeJS #Frontend #V8 #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 Day 85/90 – #90DaysOfJavaScript Topic covered: Today I revised how values convert into strings in JavaScript using the toString() method. ✅ toString() converts values to string ✅ Works with numbers, booleans, arrays, objects ✅ Radix support: convert numbers to Binary, Octal, Hex ✅ Arrays → comma-separated string ✅ Objects → default "[object Object]" ✅ JSON.stringify() for readable objects ✅ Custom toString() method inside objects 🧠 Key insight: toString() cannot be used on null or undefined — throws error. 🛠️ Access my GitHub repo for all code and explanations: 🔗 https://lnkd.in/dWUFJZax Let’s learn together! Follow my journey to #MasterJavaScript in 90 days! 🔁 Like, 💬 comment, and 🔗 share if you're learning too. #JavaScript #WebDevelopment #CodingChallenge #Frontend #JavaScriptNotes #MasteringJavaScript #GitHub #LearnInPublic
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