push() → Adds a new element to the end of an array pop()→ Removes the last element from an array map()→ Transforms each array item into something new filter() → Selects elements that match a condition slice()→ Extracts a portion without modifying the original split() → Converts a string into an array trim() → Removes extra spaces from a string Object.keys() → Gets all keys from an object Object.assign() → Combines multiple objects into one toFixed() → Formats numbers with fixed decimals parseInt() → Converts a string into an integer Math.random() Generates a random number Date.now() → Returns the current timestamp Save it. Practice it. Use it #JavaScript #WebDevelopment #Coding #100DaysOfCode #FrontendDevelopment #Programming #LearningJourney
Mastering JavaScript Array Methods
More Relevant Posts
-
The new keyword looks simple… but most people use it without knowing what it actually does 👀 That’s exactly where confusion starts. Why does a function suddenly create objects? Where does this point? And how do methods magically appear? 👉 It’s all because of new. In this blog, I’ve explained: What new actually does behind the scenes How constructor functions create objects How objects link to shared methods (prototype) Why everything breaks without new Kept it simple, with step-by-step explanation and examples ✨ 🔗 Read here: https://lnkd.in/dyZwek-x Would love your feedback 🙌 Next: Constructor Functions or this keyword? #javascript #webdevelopment #programming #coding
To view or add a comment, sign in
-
-
I got tired of online document converters charging for basic features, so I built my own. Meet Radius a simple, secure tool for Word and PDF conversions. How I built it: 🔹 Backend: Python + FastAPI 🔹 Frontend: HTML/CSS 🔹 Goal: Speed, simplicity, and 100% free. Sometimes the best way to learn a new framework is to solve a problem you actually have. The site: https: https://lnkd.in/eGwV45xA #PythonDeveloper #FastAPI #WebDev #ProjectShowcase #Programming #FullStack
To view or add a comment, sign in
-
-
Task 4 CodSoft Built a Rock Paper Scissors Game GUI using Python and PySide6 🎮 This interactive desktop application lets users play against the computer with: • Classic game logic (Rock, Paper, Scissors) with random computer choices • Live score tracking with rounds counter • Dynamic scoreboard updates in real time • Pop-up messages for results and game outcomes • User-friendly interface with icons and buttons The game ends when either the player or the computer reaches 3 points, making it engaging and competitive. This project helped me explore GUI development with PySide6, event-driven programming, and managing application state effectively. Excited to improve it further by adding animations, sound effects, and enhanced UI design! #Python #PySide6 #GUI #GameDevelopment #Coding #Projects
To view or add a comment, sign in
-
🧠 Coding Challenge: Merge Sorted Arrays Here’s a simple-looking problem that tests your logic and attention to detail 👇 You are given two sorted arrays: let arr1 = [1, 5, 8, 9] let arr2 = [3, 4, 6, 10] 🎯 Task: Merge these two arrays into a single sorted array. Sounds easy, right? But there’s a catch… 👀 Think about: - How will you compare elements efficiently? - What happens when one array finishes before the other? - Are you sure your loop covers all cases? ⏳ Take a moment and try solving it yourself before scrolling further. 💬 If you get stuck or want to verify your approach, check the answer in the comments! #JavaScript #CodingChallenge #DSA #Programming #WebDevelopment
To view or add a comment, sign in
-
-
LeetCode Day 18 : Problem 125 (Valid Palindrome) Just solved another LeetCode problem. It was "Valid Palindrome", sounds simple, right? But here's what I actually learned: I used a for loop with an index variable that I never actually used inside the loop. Both pointers left and right were doing all the work. When you have two pointers moving independently, a while loop is always the right choice. The loop variable was just noise. I was comparing characters before checking if they were valid alphanumeric. If a comma or space slips through to the comparison step, the logic breaks. Always skip invalid characters first, then compare. Order of conditions matters more than you think. The approach itself was classic two pointer, start from both ends, skip non-alphanumeric characters, compare valid ones, move inward. If pointers meet in the middle without a mismatch, it's a palindrome. Twenty two problems in. The two pointer opposite ends pattern keeps showing up. Sorted array problems, palindrome problems, rain water problems, same skeleton every time. Start both ends, move inward based on a condition. The real lesson? Always ask yourself if you actually need the loop variable. If you don't use it, the loop type is probably wrong. #DSA #LeetCode #JavaScript #CodingJourney #Programming
To view or add a comment, sign in
-
-
📰 Your source file should read like a newspaper. Headline first. In a newspaper, the headline tells you everything upfront. In your code, that headline is your highest-level function — place it at the top. Then, just like a newspaper, every detail follows naturally below. Each function lives just below its caller, so the code flows from high-level concepts down to low-level details. And functions that don't call each other but serve a similar purpose? Group them together. Clean Code calls this conceptual affinity. The result: big picture at the top → call order in the middle → shared utilities at the bottom. 🗞️ #CleanCode #Flutter #Dart #CodeQuality #SoftwareEngineering #Programming #DevTips #100DaysOfCode
To view or add a comment, sign in
-
-
LeetCode Day 2 : Problem 26 (Remove Duplicates from Sorted Array) Just solved my third LeetCode problem. It was "Remove Duplicates from Sorted Array", sounds straightforward, right? But here's what I actually learned: My first instinct was to use .splice() inside a loop. It works, but every splice shifts all elements after it, meaning for a large array you're doing that shift hundreds of times. Slow. I also added .sort() at the top — but the problem already guarantees a sorted array. Sorting again is just wasted work. Always read the constraints. The fix? Two Pointer pattern again. Since duplicates are always next to each other in a sorted array, just compare each element with the previous one. One pass, no splicing, no sorting. Three problems in. The Two Pointer pattern has shown up in all three. Same idea, slightly different condition each time. The real lesson? Before writing code, read the constraints carefully. They often tell you exactly what you don't need to do. #DSA #LeetCode #JavaScript #CodingJourney #Programming
To view or add a comment, sign in
-
-
Post No: 044 Today I learned something interesting about C++ casting. Earlier, in old C-style syntax, type conversion was usually written like this: int x = (int) 3.14; This works, but it does not clearly show what type of conversion is happening. The same style can be used for multiple kinds of casts, which can sometimes make the code difficult to read and even unsafe. Modern C++ introduced a clearer way: int x = static_cast<int>(3.14); This is called explicit casting. What I found interesting is that it makes the developer’s intention very clear. Anyone reading the code can immediately understand that the conversion is being done deliberately. C++ also provides different cast types for different use cases: - static_cast -> normal type conversion - dynamic_cast -> inheritance and OOP - const_cast -> remove const - reinterpret_cast -> low-level memory conversion #cpp #cplusplus #softwaredevelopment #programming #coding #developers #learning #tech
To view or add a comment, sign in
-
-
I built a programming language to beat EXAPUNKS. EXAPUNKS is a puzzle game where you write code in a low-level language similar to assembly. It's fun — until you're debugging 50 lines of jumps and labels for the tenth time. So I thought: what if I made a higher-level language that compiles down to it? Something like what C is to assembly. Loops instead of jump labels. Math expressions instead of manual register shuffling. Named EXAs instead of copy-pasted blocks. I built a lexer, a parser, and a compiler. The language supports loops, conditionals, math expressions, and spawning parallel processes — all compiled into valid game code you can paste straight into the game window. Was the compiled output bigger than hand-written code? Sure. Same as C binaries are bigger than hand-written assembly. That wasn't the point. Suddenly, writing parsers for custom data formats or building DSLs for internal tools didn't feel intimidating anymore. It felt like something I'd already done. And it's just fun! If you want to get good at something complex, find a toy problem that makes you want to solve it. The learning sticks better when you're having fun. If you could build your own language for anything — a game, a tool, a workflow — what would it be for? #DSL #exapunks #programming #games #CompilerDesign #ProgrammingLanguages
To view or add a comment, sign in
-
-
Mastering Memory Management in JavaScript: A Practical Guide JavaScript abstracts away low‑level memory handling, but developers still need to understand how the engine allocates, retains, and releases memory to write performant, leak‑free applications. This guide covers the memory model, common leak patterns, detection techniques, and best‑practice solutions with real‑world code examples. Read the full article 👇 https://lnkd.in/gvd2MRAK #Technology #Programming #WebDevelopment #SoftwareEngineering #Coding #JavaScriptMemory #MemoryManagement #JSPerformance #MemoryLeaks #FrontendOptimization #FutureOfWork #DigitalTransformation
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