🚫 Don’t solve this question. Solve it the RIGHT way. Problem: Reverse a string in JavaScript Most beginners jump straight into coding. But they miss THIS 👇 ❌ Common Mistake: Trying to modify the string directly 👉 Strings in JavaScript are immutable 💡 Think like this: - Can I access characters using index? - Can I build a new string instead? - Should I convert it into an array? 🧠 Want a HINT (not solution)? Comment “HINT” and I’ll share how to approach it. #JavaScript #CodingRudiments #LearnToCode #ProblemSolving
Reverse String in JavaScript: Immutable Strings and Index Access
More Relevant Posts
-
Work in progress 💻 Deep in the code today, building out new functionality for Scrimba Advance JavaScript. Sometimes the best commits are the ones that say "promise" twice because that's exactly what clean, asynchronous code delivers. Those small, focused commits? That's where the real progress happens. 𝖶𝖺𝗇𝗍 𝗍𝗈 𝗅𝖾𝖺𝗋𝗇 coding click 𝗁𝖾𝗋𝖾 👉🏽 : https://shorturl.at/cESup #WebDevelopment #JavaScript #Coding
To view or add a comment, sign in
-
-
Understanding JavaScript arrays changed how I think as a developer. Coming from a teaching background I thought coding was memorizing syntax. Feeling a level of guilt when I pulled out my cheat sheet. But working with arrays like .map( ) and .reduce( ) helped me make a lasting connection. It’s not about memorizing code. It’s about solving problems efficiently. Instead of looping manually, I can transform and analyze data in a much cleaner way. If you’re learning JavaScript, stick with it until it clicks! Now I focus less on memorizing and more on understanding patterns. #SoftwareDeveloper #Tech #FullStack #JavaScript #SoftwareEngineer #WebDevelopment #MERNStack
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
-
-
🚀 Understanding Template Literals in JavaScript 📖 Read full guide: https://lnkd.in/ghJ6jZRm While working with JavaScript, I explored how Template Literals simplify string handling and improve code readability. 🔍 Old way (messy): "Hello " + name + "!" ✨ New way (clean): Hello ${name}! 💡 Key Benefits: ✔ Easy variable embedding ✔ Multi-line strings ✔ Cleaner, more readable code Small feature, but a big impact in modern JavaScript 🚀 #JavaScript #WebDevelopment #Coding #FrontendDevelopment #LearningJourney #CleanCode
To view or add a comment, sign in
-
-
Consistency is starting to compound, and Day 59 is proof of that 💻✨ Today’s focus was solving the “string ends with?” problem in JavaScript. It looked simple at first, but it really helped reinforce how built-in methods like endsWith() work under the hood. Also explored an alternative approach using slice()—a great reminder that there’s always more than one way to solve a problem. The biggest learning? Writing clean, readable solutions is just as important as getting the correct output. 🧠 One step closer to mastering problem-solving and strengthening core JavaScript fundamentals 🚀 #100DaysOfCode #JavaScript #CodingJourney #ProblemSolving #WebDevelopment #LearnToCode #Consistency #TechGrowth
To view or add a comment, sign in
-
-
🚀 How JavaScript Runs Your Code (Super Simple) Ever wondered what happens behind the scenes when you run JavaScript? 🤔 Let’s break it down step by step 👇 🧠 Step 1: Read 👉 JavaScript reads your code line by line 🔍 Step 2: Break 👉 Code is broken into small pieces (tokens) 🌳 Step 3: Understand (AST) 👉 JavaScript creates a structure (AST) of your code ⚡ Step 4: Convert (JIT) 👉 Code is converted into machine code during execution ▶️ Step 5: Execute 👉 JavaScript runs the compiled code 💡 Easy Flow: 👉 Read → Break → Understand → Convert → Execute 🔥 One line to remember: 👉 “JavaScript understands and runs your code at the same time” 💬 Which step was new for you? 📌 Save this for interviews (very important concept) #javascript #webdevelopment #frontend #coding #programming #javascriptdeveloper #learncoding #developers #100DaysOfCode
To view or add a comment, sign in
-
-
Day 3 — JavaScript is humbling me in the best way. Started with the basics I thought I already knew. Turns out I knew the syntax but not the why. var vs let vs const — I used to just pick randomly. Now I get why const is default and var is basically legacy. The thing that actually clicked today: arrow functions aren't just shorter syntax. They handle 'this' differently. That's why everyone prefers them in certain situations. Also spent an hour on map, filter, and reduce with real data instead of fake tutorials. Way more useful. Favourite thing I learned: optional chaining (?.) — it's saved me from so many "cannot read property of undefined" errors already. Drop a JavaScript concept below that confused you at first 👇 #javascript #webdevelopment #frontenddeveloper #coding
To view or add a comment, sign in
-
🚀 Functions changed how I think about writing JavaScript code. While learning JavaScript, I realized something simple but powerful: 👉 Functions prevent repetition and make code reusable. Today I explored functions in depth and covered: • Different ways to create functions • Modern arrow functions • Rest vs Spread operators and how they differ • Callback functions and how functions can be passed as arguments One thing that stood out to me is how functions are not just reusable blocks — they are first-class citizens in JavaScript, meaning they can be stored, passed, and returned like any other value. This opens the door to more advanced patterns and cleaner code structure. Detailed Notes below provided by CoderArmy Channel. Course Instructor: Rohit Negi | Youtube Channel: Coder Army #JavaScript #WebDevelopment #BuildInPublic #FullStackDevelopment
To view or add a comment, sign in
-
JavaScript becomes a different language the moment you realize this: 👉 Functions are not just reusable blocks… they are values. And once you understand that, concepts like callbacks and higher-order functions stop feeling confusing and start feeling natural. In this video, I’ve broken it down step by step: How values behave in JavaScript How objects behave Why functions behave the same way (and why that matters) From there, everything builds logically: ✔ Passing functions as arguments ✔ Returning functions from functions ✔ What exactly a callback is ✔ What a higher-order function is ✔ How this leads to more flexible and reusable code No jargon. No unnecessary complexity. Just a clear, practical approach to a core JavaScript concept. 🎥 Watch here: https://lnkd.in/gM8ibZ6M This is Part 1 — next, we’ll explore how this shows up in real code with: setTimeout, forEach, map, filter #JavaScript #WebDevelopment #FrontendDevelopment #Programming #Coding #LearnToCode #JavaScriptDeveloper #SoftwareDevelopment #Developers #CodingJourney #TechEducation #Hosiyar #JS
Callback Functions and Higher Order Functions in JavaScript | JS Mastery #12
https://www.youtube.com/
To view or add a comment, sign in
-
🚀 JavaScript Practice – Core Logic Building Worked on some important problems without using built-in methods: 🔹 String → Number (without parseInt) using ASCII 🔹 Number → String (manual + template + coercion) 🔹 Count character occurrences ("hello world" → "l" = 3) 🔹 Check if string contains only digits (Regex + ASCII) 💡 Key Learnings: 🔹digit = digit * 10 + (ascii - 48) 🔹Inside range → &&, Outside range → || 🔹digit + str helps maintain correct order 🔥 Strengthening fundamentals and improving problem-solving step by step. #JavaScript #Coding #ProblemSolving #FrontendDevelopment #Learning
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