A Day in My Life: Planned vs. Reality (Using 10 JavaScript Array Methods)

MOHIT WAGISHMOHIT WAGISH
2 min read

Hereโ€™s how my perfectly planned daily routine turned into a chaotic mess, explained using JavaScriptโ€™s top 10 array methods. ๐Ÿคฃ

  1. push() โ€“ Planning My Day-(it will increase the length of array and return same array)

    The night before, I carefully planned my schedule.

     let myDay = [];
     myDay.push("Wake up at 6 AM", "Workout ๐Ÿ‹๏ธ", "Healthy breakfast ๐Ÿฅ‘", "Work on project ๐Ÿ’ป", "Read a book ๐Ÿ“–", "Sleep at 10 PM");
     console.log("Planned Day:", myDay);
    

    ๐Ÿ“ Plan: A productive, healthy, well-balanced day.
    ๐Ÿ˜Ž Reality: The plan existed... but my willpower didnโ€™t.

    1. shift() โ€“ Snooze Button Wins -(it will remove the first element and reduce array length but return the same array)

      6 AM Alarm: BEEP BEEP โฐ
      Me: Just 5 more minutesโ€ฆ

       let firstTask = myDay.shift();
       console.log("Skipped:", firstTask); // "Wake up at 6 AM"
      

      ๐Ÿ’ค Reality: Woke up at 10 AM instead.

    2. unshift() โ€“ Emergency Fix -[it will add specified nos of array at begineeing of array ]

      Now Iโ€™m late! Gotta prioritize survival tasks.

       myDay.unshift("Panic shower ๐Ÿšฟ", "Quick coffee โ˜•");
       console.log("Updated Plan:", myDay);
      

      ๐Ÿ”ฅ Reality: Morning routine reduced to speedrunning life.

    3. pop() โ€“ Goodbye, Productivity

       let lastTask = myDay.pop();
       console.log("Cancelled:", lastTask); // "Sleep at 10 PM"
      

      ๐Ÿฆ‰ Reality: "Who needs sleep when you have YouTube at 2 AM?"

    4. splice() โ€“ Removing the Gym-[splice(index,nos of elements,items to replace with- can be multiple elements)]

      Workout? LOL. NO.

       let removed = myDay.splice(myDay.indexOf("Workout ๐Ÿ‹๏ธ"), 1);
       console.log("Avoided:", removed);
      

      ๐Ÿ’ช Reality: Lifting spoon to mouth counts, right?

    5. slice() โ€“ Only Doing Fun Stuff

      What if I only did the fun parts of my plan?

       let funOnly = myDay.slice(1, 3);
       console.log("Things I actually did:", funOnly);
      

      ๐Ÿ• Reality: Breakfast and scrolling memes took priority.

    6. map() โ€“ Adding Excuses to Everything

       let excuses = myDay.map(task => task + " (but later)");
       console.log("Procrastination Mode:", excuses);
      

      ๐Ÿ“œ Reality: "I'll do it... tomorrow." (Famous last words)

    7. filter() โ€“ Removing Boring Stuff

       let importantStuff = myDay.filter(task => task.includes("Netflix") || task.includes("Food"));
       console.log("What I actually did:", importantStuff);
      

      ๐Ÿ“บ Reality: Netflix and eatingโ€ฆ priorities, right?

    8. find() โ€“ Last-Minute Productivity

       let lastMinuteWork = myDay.find(task => task.includes("Work"));
       console.log("Almost Did:", lastMinuteWork);
      

      โŒ› Reality: Opened my laptop, stared at the screen, then closed it.

    9. reduce() โ€“ Summing Up My Day

      let summary = myDay.reduce((acc, task) => acc + " โžก๏ธ " + task);
      console.log("Final Day Summary:", summary);
      

      ๐ŸŒ€ Reality: A beautiful mess, connected by naps and snacks.

Final Thoughts

  • Planned: Productivity, fitness, self-improvement.

  • Reality: Chaos, procrastination, and a Netflix marathon.

At least I triedโ€ฆ kinda. ๐Ÿ˜…

12
Subscribe to my newsletter

Read articles from MOHIT WAGISH directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

MOHIT WAGISH
MOHIT WAGISH