✨ 𝗗𝗮𝘆 𝟭𝟮 𝗼𝗳 𝗠𝘆 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗝𝗼𝘂𝗿𝗻𝗲𝘆 🚀 Today I explored powerful 𝗔𝗿𝗿𝗮𝘆 𝗠𝗲𝘁𝗵𝗼𝗱𝘀 𝗮𝗻𝗱 𝘁𝗵𝗲 𝗱𝗮𝘁𝗮 𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲𝘀 𝗦𝗲𝘁 & 𝗠𝗮𝗽. 🔹 Practiced array methods like 𝗺𝗮𝗽(), 𝗳𝗶𝗹𝘁𝗲𝗿(), 𝗿𝗲𝗱𝘂𝗰𝗲(), 𝗳𝗼𝗿𝗘𝗮𝗰𝗵() — making data transformation cleaner and more functional. 🔹 Learned how 𝗦𝗲𝘁 stores unique values. 🔹 Understood how 𝗠𝗮𝗽 stores key-value pairs with better flexibility than plain objects. It’s amazing how these built-in structures make handling data more efficient and readable. Step by step, strengthening my JavaScript fundamentals 💪 #JavaScript #100DaysOfCode #WebDevelopment #LearningJourney #FrontendDevelopment #DataStructures
Day 12 of My JavaScript Journey: Arrays and Data Structures
More Relevant Posts
-
𝗧𝗵𝗲 𝗙𝗮𝗦𝗧𝗲𝗦𝗧 𝗖𝗼𝗱𝗲 𝗦𝗲𝗮𝗿𝗰𝗵 𝗧𝗼𝗼𝗹 You need to find patterns in your codebase. Maybe it's leftover console.log calls or renaming a variable across hundreds of files. You could use find-and-replace, but it only matches text. It doesn't understand code. What you really want is a tool that understands the structure of your code. These are called structural code search tools. They parse your code into a tree, then let you match against the shape of the code rather than its raw text. I tested five popular options: - ast-grep - GritQL - semgrep - jscodeshift - recast I generated 500 JavaScript and TypeScript files and ran three tasks: - Simple search: find every console.log call - Code transformation: change every var to const - Complex search: find async functions with try/catch blocks Here are the results: - ast-grep is 5x faster than the next fastest tool and uses a fraction of the memory. - ast-grep processed 500 files in roughly the time it takes you to blink. - The speed gap widens on harder tasks. I used tree-sitter, a parsing library, and Rust to build ast-grep. It's focused on structural search and replace. You can run the benchmark code on your own machine: https://lnkd.in/gKzHVJR6 Source: https://lnkd.in/g34pEFrE
To view or add a comment, sign in
-
📣 𝗡𝗲𝘅𝘁 𝗕𝗹𝗼𝗴 𝗶𝘀 𝗛𝗲𝗿𝗲! ⤵️ Understanding Objects in JavaScript — Finally Making Data Feel Organized 🧠📦 Storing values in separate variables works… until your program starts growing. This blog explains JavaScript objects in a simple, practical way — so beginners can understand how real applications manage structured data. 🔗 𝗥𝗲𝗮𝗱 𝗵𝗲𝗿𝗲: https://lnkd.in/gt_9TVF4 𝗧𝗼𝗽𝗶𝗰𝘀 𝗰𝗼𝘃𝗲𝗿𝗲𝗱 ✍🏻: ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺ ⇢ Why objects are needed in real programs ⇢ Key-value pair mental model ⇢ Creating objects (literal vs constructor way) ⇢ Dot notation vs bracket notation ⇢ Updating, adding, and deleting properties ⇢ Looping through objects using for...in ⇢ Object vs array — beginner confusion cleared ⇢ Array of objects (real-world data pattern) ⇢ Common mistakes beginners make 💬 If JavaScript data still feels scattered across variables, this article helps you understand how objects bring structure, clarity, and scalability to your code. #ChaiAurCode #JavaScript #Objects #ProgrammingBasics #WebDevelopment #Beginners #LearningInPublic #100DaysOfCoding
To view or add a comment, sign in
-
-
Primitive data types JavaScript has only a few primitive data types… but they power almost everything you build. 🚀 If you are learning JavaScript, understanding primitive data types is one of the first important steps. Primitive values are the most basic data types in JavaScript. They store simple values directly in memory. Here are the main primitive types you should know: • String – Text values like "Hello World" • Number – All numbers, including integers and decimals like 10 or 3.14 • Boolean – Only two values: true or false • Undefined – A variable that is declared but not assigned a value • Null – A variable that intentionally has no value These simple building blocks are used in almost every JavaScript program. When you understand primitives well, learning objects, arrays, and functions becomes much easier. #JavaScript #WebDevelopment #FrontendDevelopment #ProgrammingBasics #LearnToCode #CodingForBeginners #JavaScriptDeveloper #SoftwareEngineering #TechLearning #DeveloperCommunity
To view or add a comment, sign in
-
-
Day 04 of Learning JavaScript Deep Today’s topic looked simple… but turned out to be powerful Traversing an Array - Visiting each element one by one. Example: let arr = [10, 20, 30, 40]; for (let i = 0; i < arr.length; i++) { console.log(arr[i]); } 🧠 Key understanding: Arrays start at index 0 End at length - 1 One mistake can break logic 👇 for (let i = 0; i <= arr.length; i++) { console.log(arr[i]); // undefined at end ❌ } 💭 Simple thought: “Array is just data… Traversal is how you understand it.” Small concept… big impact 🔥 #Day04 #JavaScript #FrontendDevelopment #LearningDeep #Traversing #Arraybasics
To view or add a comment, sign in
-
Day 7 #100DaysOfCode 💻 Today I learned Using async/await instead of then() with fetch. Normally we do: fetch('https://lnkd.in/gAwJs9UG') .then(res => res.json()) .then(data => console.log(data)); Better approach with async/await: async function getData() { try { const res = await fetch('https://lnkd.in/gAwJs9UG'); const data = await res.json(); console.log(data); } catch(err) { console.error(err); } } getData(); ✨ Reflection: Async/await makes code cleaner, easier to read, and simpler for error handling. #javascript #asyncawait #webdevelopment #100DaysOfCode #Akbiplob
To view or add a comment, sign in
-
Lately, I’ve been diving deeper into JavaScript’s "Map" and it’s one of those constructs that quietly shifts how you think about data structures. Unlike plain objects, "Map" is purpose-built for key-value storage with consistent performance characteristics. The standout advantage is its average O(1) time complexity for insertions, lookups, and deletions. When you're working on performance sensitive paths, caching, frequency tracking, or implementing patterns like LRU, this becomes a meaningful edge. That said, like any optimization tool, it’s not a silver bullet. "Map" introduces additional memory overhead and, in simpler use-cases, can reduce readability compared to plain objects. If your keys are simple strings and you don’t need ordered iteration or frequent mutations, an object might still be the more pragmatic choice. Understanding when to leverage O(1) access patterns versus when to prioritize simplicity is what separates working code from well-engineered systems. Please explore it and share your findings if you find it as cool as I did.
To view or add a comment, sign in
-
How API Fetch Works in JavaScript Today I explored fetching data from APIs in JavaScript. Here’s the core idea: const response = await fetch('https://lnkd.in/gtuyqVPs'); const data = await response.json(); console.log(data); Key takeaways: fetch() → request data from an API async/await → makes async code readable response.json() → converts data to usable objects Fun tip: I even visualized this in a colorful notebook-style page with doodles, icons, and notes. It really helps to understand the flow of data! #JavaScript #WebDev #API #CodingTips #LearningByDoing #TechNotes
To view or add a comment, sign in
-
-
🛑 "Using Nested For-Loop" JavaScript has evolved significantly, but many of us still rely on outdated nested loops, a major bottleneck for performance optimization. If your code looks like the left side of this image, it’s time for an upgrade. Check out this quick breakdown of why nested loops are inefficient and how modern alternatives can revolutionize your data processing: 🔹 The "Don't": Standard nested loops create high overhead and are difficult for the browser to optimize and slow in querying database. They lead to slow code execution. 🔹 The "Do": Modern, clean alternatives like .forEach(), .map(), .filter(), and .reduce(). These methods are not only more readable but also leverage modern engine optimizations for massive speed boosts. Don't let legacy coding habits hold your application back. Embrace the efficiency of modern JavaScript. #JavaScript #CodingBestPractices #SoftwareEngineering
To view or add a comment, sign in
-
-
Day 33: Implementing an array flattener. Focusing on the logic behind converting nested arrays into a single-dimensional structure. While JavaScript provides the flat method, writing a manual implementation using recursion helped clarify how to traverse unknown depths of data. Key takeaways: Recursion base cases: Identifying when an element is a primitive value versus another array. Method overhead: Understanding the difference between built-in methods and custom recursive functions in terms of readability and performance. Data manipulation: Practical applications in handling complex API responses where data is often deeply nested. #JavaScript #WebDevelopment #CodingJourney #Frontend #ComputerScience
To view or add a comment, sign in
-
-
📘 𝐉𝐚𝐯𝐚𝐒𝐜𝐫𝐢𝐩𝐭 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐌𝐨𝐝𝐮𝐥𝐞 (𝐁𝐚𝐬𝐢𝐜) 𝐒𝐞𝐜𝐭𝐢𝐨𝐧 2: 𝐕𝐚𝐫𝐢𝐚𝐛𝐥𝐞𝐬 1.What is a variable? 2.Why do we use a variable? 3.How to declare a variable? 4.Tell me about variable declaration rules? 5.How many types of variables do you know? 6.When do we use var? 7.When do we use let? 8.When do we use const? 9.How to create an undefined variable? 10.What is an undefined variable? 11.What is undefined? 12.What is NaN? 13.What is null? 14.What is concatenation? 15.What is Infinity? 16.How to assign data to a variable / How to assign a variable data? 17.Variable is primitive or non-primitive? 🎯 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐐𝐮𝐞𝐬𝐭𝐢𝐨𝐧𝐬 (𝐄𝐱𝐭𝐫𝐚) 1.Difference between var, let, and const? 2.What is variable hoisting? 3.Why can var be accessed before declaring it? 4.What is temporal dead zone (TDZ)? 5.Can we reassign const variable? 6.Why shouldn't modern JavaScript use var? 𝐒𝐞𝐜𝐭𝐢𝐨𝐧 3: 𝐉𝐚𝐯𝐚𝐒𝐜𝐫𝐢𝐩𝐭 𝐃𝐚𝐭𝐚 𝐓𝐲𝐩𝐞𝐬 & 𝐊𝐞𝐲𝐰𝐨𝐫𝐝𝐬 1.JavaScript data types? 2.What is a reserved keyword? 3.What is a special keyword? 4.How can check type data type? 5.JavaScript variables is case-sensitive? 6.JavaScript variable naming conventions? 7.How to convert string ("20") to number (20)? 8.JavaScript built-in functions? 🎯 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐐𝐮𝐞𝐬𝐭𝐢𝐨𝐧𝐬 (𝐄𝐱𝐭𝐫𝐚) 1.Difference between primitive and reference types? 2.What is type coercion? 3.Difference between null and undefined? 4.What is typeof null / What is the output of typeof null and why? (Important trick question) 5.What is the difference in memory management between primitive and reference type data? #DotNet #AspNetCore #MVC #FullStack #SoftwareEngineering #ProgrammingTips #DeveloperLife #LearnToCode #JavaScript #JS #JavaScriptTips #JSLearning #FrontendDevelopment #WebDevelopment #CodingTips #CodeManagement #DevTools
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