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


Hereโs how my perfectly planned daily routine turned into a chaotic mess, explained using JavaScriptโs top 10 array methods. ๐คฃ
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.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.
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.
pop()
โ Goodbye, Productivitylet lastTask = myDay.pop(); console.log("Cancelled:", lastTask); // "Sleep at 10 PM"
๐ฆ Reality: "Who needs sleep when you have YouTube at 2 AM?"
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?
slice()
โ Only Doing Fun StuffWhat 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.
map()
โ Adding Excuses to Everythinglet excuses = myDay.map(task => task + " (but later)"); console.log("Procrastination Mode:", excuses);
๐ Reality: "I'll do it... tomorrow." (Famous last words)
filter()
โ Removing Boring Stufflet importantStuff = myDay.filter(task => task.includes("Netflix") || task.includes("Food")); console.log("What I actually did:", importantStuff);
๐บ Reality: Netflix and eatingโฆ priorities, right?
find()
โ Last-Minute Productivitylet lastMinuteWork = myDay.find(task => task.includes("Work")); console.log("Almost Did:", lastMinuteWork);
โ Reality: Opened my laptop, stared at the screen, then closed it.
reduce()
โ Summing Up My Daylet 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. ๐
Subscribe to my newsletter
Read articles from MOHIT WAGISH directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
