Today’s Learning – JavaScript Array Methods Today I learned about Array Methods in JavaScript. Arrays are very powerful because they allow us to store multiple values in a single variable, and array methods help us work with that data easily. Some methods I practiced today: push() – adds a new element at the end of an array pop() – removes the last element from an array shift() – removes the first element unshift() – adds a new element at the beginning map() – creates a new array by transforming elements filter() – creates a new array with elements that match a condition forEach() – loops through each element in the array Learning these methods helps me write cleaner and shorter code in JavaScript. I am currently improving my JavaScript fundamentals step by step as part of my Frontend Developer learning journey. #JavaScript #WebDevelopment #FrontendDevelopment #CodingJourney
Mastering JavaScript Array Methods for Cleaner Code
More Relevant Posts
-
🚀 What I Learned Today – JavaScript Basics Today I revised some important JavaScript fundamentals: 🔹 Assignment Operators ("=", "+=", "*=", "%=") 🔹 Comparison Operators ("==", "===", "!=", ">", "<", ">=", "<=") 🔹 Logical Operators ("&&", "||", "!") 🔹 Conditional Statements ("if", "if...else", "else if", ternary operator) I also learned about prompt() for user input and type coercion (implicit & explicit type conversion). Using MDN Docs as a reference while learning JavaScript. Small steps every day to become a better developer. 💻 #JavaScript #WebDevelopment #LearningInPublic #CodingJourney
To view or add a comment, sign in
-
🚀 JavaScript Practice: Improving Logic with Real Examples 💡 🚀Today I focused on strengthening my core JavaScript skills by working on two small but powerful problems.🚀 1. Character Frequency Counting 💬I explored how to count how many times each character appears in a string like "racecar". This helped me understand how objects can be used to store and update values dynamically. I also learned how to transform that data into a clean, readable format.💬 📌 Key learning: 🔹 Using objects to track frequency 🔹 Converting data into a structured format 🔹 Building clean output instead of messy strings 2. Array Pair Formatting Next, I worked on converting an array into a custom pair format like [1:2, 3:4, 5:6]. This improved my understanding of looping with steps and grouping elements logically. 📌 Key learning: Iterating through arrays in steps Grouping elements into pairs Understanding the difference between actual data structures and formatted output 🔥 Overall Takeaways ✔ Improved problem-solving approach ✔ Better understanding of objects and arrays ✔ Learned how to format output cleanly and efficiently #JavaScript #CodingPractice #FrontendDevelopment #ProblemSolving #LearningJourney
To view or add a comment, sign in
-
-
🚀 I’ve been working on a JavaScript learning series and publishing articles along the way. Sharing a few of my recent articles below: 🔗 JS Series https://lnkd.in/gEUsN-sC 🔗 Control Flow in JavaScript https://lnkd.in/gJ98XirU 🔗 Variables & Data Types in JavaScript https://lnkd.in/gcAaB_qQ 🔗 JavaScript Operators Basics https://lnkd.in/gFdCZm4Y Currently documenting my JavaScript learning journey and trying to make concepts simple and beginner-friendly. Would love to hear your feedback! 👩💻 #chaiaurcode #cohort2026 #JavaScript #WebDevelopment #Coding #LearningInPublic #Developers
To view or add a comment, sign in
-
-
Frontend Learning — Stale Closures in JavaScript Ever logged a value inside setTimeout or an async function… and got something unexpected? That’s because of stale closures — one of the most common (and confusing) issues in JavaScript. -> Why this happens: Functions capture variables at the time they are created They don’t automatically get the latest updated value Async operations (like setTimeout) expose this issue more clearly -> Key Takeaway: If your function runs later, it might use old (stale) data instead of the latest value. Mastering closures = fewer bugs + better async logic. #JavaScript #FrontendDevelopment #Closures #AsyncJavaScript #WebDevelopment #CodingTips #LearnInPublic #DeveloperJourney
To view or add a comment, sign in
-
-
Variables in JavaScript 🚀 Every JavaScript program starts with ONE simple thing: a variable. If you're learning JavaScript, understanding variables is your first big step. A variable is like a container that stores data so your program can use it later. Think of it like a labeled box where you keep information. In JavaScript, we use variables to store things like names, numbers, or results. Example: let name = "Shital"; Now the variable name stores the value "Shital". Here are the basics every beginner should know: • Variables store data – text, numbers, true/false, objects, etc. • let is the most common way to create a variable in modern JavaScript • const is used for values that should not change • Good variable names make code easier to read Simple example: let age = 25; const country = "India"; Now your program remembers these values and can use them anytime. Small concept. Huge importance in programming. #JavaScript #WebDevelopment #LearnToCode #FrontendDevelopment #ProgrammingBasics #CodingForBeginners #JavaScriptLearning #SoftwareDevelopment #DeveloperCommunity #CodeNewbie
To view or add a comment, sign in
-
-
🚀✨ Today's JavaScript Practice: Strengthening My Fundamentals! ✨🚀 ✨I dedicated some time today to revise and practice core JavaScript concepts. Here's a quick summary of what I worked on 👇 🔹 Primitive Datatypes Created and printed variables using different primitive types like string, number, boolean, undefined, and null. 🔹 Type Conversion Practiced converting a string to a number and vice versa using Number() and String(). 🔹 Objects Stored a person's details using an object and printed the data. 🔹 Even or Odd Checker Built a program to check whether a number is even or odd using multiple approaches. 🔹 Grade Calculator Developed a program using if-else and switch statements to calculate grades based on marks and display results accordingly. 💡 Key Learnings: Strengthened my understanding of variables and datatypes Improved logic building with conditionals and loops Practiced real-time input handling and validation Gained confidence in writing small JavaScript programs Consistency is the key to mastering programming 💪 ✨ #JavaScript #WebDevelopment #Coding #FrontendDevelopment #LearnToCode #Programming ✨
To view or add a comment, sign in
-
🚀 Hello Everyone ✋ Practicing JavaScript Array Methods 💻 Today I worked on some important JavaScript array operations that are super useful for real-world development. Here’s a quick summary of what I explored 👇 🔹 filter() method Extracted even numbers from an array Separated positive and negative numbers Filtered strings based on length Retrieved names starting with a specific letter Removed falsy values like 0, null, undefined, and empty strings 🔹 Sorting & Reversing Used sort() to arrange elements Used reverse() to flip the order 🔹 Array Manipulation Methods pop() → Remove last element push() → Add element at the end shift() → Remove first element unshift() → Add element at the beginning 💡 Key Learning: Understanding these methods makes data handling much easier and improves code readability and efficiency. 📌 Next step: Deep dive into map() and forEach() for transformations and iterations. #JavaScript #WebDevelopment #Coding #Learning #Frontend #100DaysOfCode
To view or add a comment, sign in
-
Day 2 of My JavaScript Journey 🚀 Today, I learned about values and variables in JavaScript. Values are the most fundamental unit of information in programming. Everything in JavaScript is built around values; numbers, text, true/false, etc. Variables, on the other hand, are like containers (or boxes) used to store these values so they can be reused later in a program. For example: let age = 20; Here, "20" is the value, and "age" is the variable storing it. One simple way to understand it: Values = the data Variables = where the data is stored Key takeaway: Variables make it easier to manage and reuse data efficiently in your code. I’m documenting my journey daily as I grow in JavaScript. #JavaScript #WebDevelopment #LearningInPublic #100DaysOfCode
To view or add a comment, sign in
-
📢 Just Published a New Blog! I’ve written a beginner-friendly guide on JavaScript Arrays 💻 In this article, I cover the fundamentals like: ✅ Creating arrays ✅ Accessing elements using index ✅ Updating values ✅ Looping through arrays A small step forward in my Web Development journey 📚 🔗 Read it here: https://lnkd.in/gPWCEUZ4 #JavaScript #WebDevelopment #Coding #LearnInPublic
To view or add a comment, sign in
-
📌 JavaScript vs TypeScript, Quick Comparison 💻 🔹 JavaScript (JS) - Features dynamic typing, variable এর type define করতে হয় না - Beginner friendly for easy syntax যা সহজে শেখা যায় - Runs directly in browser or NodeJS - Flexible but error-prone in large projects 🔹 TypeScript (TS) - Features Static typing যেখানে variable এর type আগে define করা লাগে - Early error detection এর কারন এ development time এ bug ধরা পড়ে - Better for type safety in large-scale applications - Compiles into JavaScript before running 🎯 Bottom Line: JavaScript is for flexibility while TypeScript is for structure and scalability #Shoshikkha #JavaScript #TypeScript #Programming #WebDevelopment #Coding #DeveloperLife #BangladeshTech 💻
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
Nice