☕ I Explained JavaScript Array Methods to My Hostel Friends While Drinking Liquor Black Tea - And It Became a Love Story

Hello :) I’m Rajarshi Chakraborty, a proactive, result-oriented STEM undergraduate majoring in Computer Science & Engineering at Techno Main Salt Lake, belonging to the class of 2027. As an aspiring Software Development Engineer (SDE/SWE/SRE), I am passionate about driving technological innovation, streamlining processes, and delivering high-impact solutions. I excel in problem-solving, critical thinking, and strategic decision-making, with a focus on agile methodologies and cross-functional collaboration. With a strong foundation in data structures, algorithms, and full-stack development, I am committed to continuous learning, performance optimization, and scalable architecture design. My technical expertise includes end-to-end development, code optimization, and software lifecycle management, ensuring robust, secure, and efficient applications. My interests lie in Gen-Agentic AI and Machine Learning , where I aim to apply predictive analytics, automation, and data-driven decision-making to enhance business intelligence and improve operational efficiency. I am actively seeking challenging roles in dynamic, growth-oriented environments where I can contribute to mission-critical projects, engage in transformational initiatives, and work alongside industry leaders. My goal is to drive measurable business outcomes, foster innovation, and advance my technical and leadership capabilities.
Disclaimer:
This story involves hostel students**, broken hearts, and liquor tea (black tea).**
Because it's month-end in an engineering hostel and nobody can afford single malt.Also relax, hostel authorities - this is purely educational and emotional debugging.
🌙 The Night Every Engineering Hostel Has
If you've ever lived in a college hostel, you know this scene. It's 2:12 AM.
One laptop running VS Code
One fan making suspicious sounds
One kettle boiling liquor black tea
Four sleep-deprived engineering students
And suddenly…
Your friend says:
"Bro....tumlogo ko pata hai woh mujhe kyu chhor ke geyi ?"
Everyone immediately replies:
"Acha bewafa ashiq … start kar. We need entertainment."
And while drinking liquor black tea ( cause we can't afford single malt , its month end running ), my friend Aman started explaining his heartbreak…..Using JavaScript array methods. And surprisingly… It made complete sense.
👨💻 My Life Was a Simple Array
Before everything happened, life was peaceful.
let friends = ["Aman", "Rohit", "Neha"];
Simple. Stable. No emotional bugs. But then one day… She joined the group.
❤️ push() - When She Entered My Life
push() adds an element to the end of an array. Just like when Riya entered my life unexpectedly and joins the group chat.
Code
let friends = ["Aman", "Rohit", "Neha"];
console.log("Before:", friends);
friends.push("Riya");
console.log("After:", friends);
Output
Before: ["Aman", "Rohit", "Neha"]
After: ["Aman", "Rohit", "Neha", "Riya"]
Visual Idea
Before
[Aman, Rohit, Neha]
push("Riya")
After
[Aman, Rohit, Neha, Riya]
My friend Rohit said:
"Bhai tu usko
push()nahi kiya… usne bas ek ‘hi’ bola aur tera dimaag full buffering mode mein chala gaya."
💔 pop() - When Reality Hit
one week later… Aman discovered something tragic. Riya already had a boyfriend. Life executed: pop()
Code
let friends = ["Aman", "Rohit", "Neha", "Riya"];
console.log("Before:", friends);
friends.pop();
console.log("After:", friends);
Output
Before: ["Aman","Rohit","Neha","Riya"]
After: ["Aman","Rohit","Neha"]
Rohit chai sip karte hue bola:
“Bhai tu usko remove nahi kiya… woh tujhe hi recycle bin se bhi permanently delete kar gayi.”
Hostel room = absolute chaos.
🔁 shift() and unshift() - Front Bench Drama
These methods work at the beginning of the array.
| Method | Action |
|---|---|
| unshift() | Add element at start |
| shift() | Remove first element |
One day Riya suddenly joined the front bench group.
unshift()
let friends = ["Aman", "Rohit", "Neha"];
friends.unshift("Riya");
console.log(friends);
Output
["Riya", "Aman", "Rohit", "Neha"]
Then one day… She stopped talking.
shift()
friends.shift();
console.log(friends);
Output
["Aman", "Rohit", "Neha"]
Rohit:
“Bhai teri love story pure queue data structure pe chal rahi hai - tu line mein laga hai aur tera number hi nahi aa raha.”
👀 forEach() - When You Just Observe
After rejection…
Aman chai ka cup ghumaate hue bola:
"Bhai uske baad maine zyada bolna hi band kar diya… bas hostel ke canteen mein baith ke sabko observe karta rehta tha."
Aur Rohit turant bol pada:
“Bhai observe nahi… stalking kar raha tha tu.”That's exactly what
forEach()does.
It runs a function for every element.
Code
let friends = ["Aman", "Rohit", "Neha"];
friends.forEach(function(friend) {
console.log(friend);
});
Output
Aman
Rohit
Neha
Important thing:
forEach() does NOT create a new array.
It simply runs a function for each element.
🧠 Traditional Loop vs map()
Old programmers used loops.
Traditional Loop
let numbers = [1,2,3,4];
let result = [];
for(let i = 0; i < numbers.length; i++){
result.push(numbers[i] * 2);
}
console.log(result);
Output
[2,4,6,8]
But modern JavaScript introduced something elegant.
🔥 map() - When Heartbreak Changes You
After rejection Aman said:
"Bro I transformed myself."
Gym
Coding
Hackathons
Open source
Just like map() transforms array elements.
Code
let numbers = [1,2,3,4];
let doubled = numbers.map(function(num){
return num * 2;
});
console.log(doubled);
Output
[2,4,6,8]
Visual
[1,2,3,4]
map(num => num * 2)
[2,4,6,8]
🚫 filter() - Removing Toxic People
After this Aman said something wise.
"Bro the real skill in life is filtering people."
That's exactly what filter() does.
Code
let numbers = [5,12,8,20,3];
let result = numbers.filter(function(num){
return num > 10;
});
console.log(result);
Output
[12,20]
Visual
[5,12,8,20,3]
Condition → num > 10
Result
[12,20]
Neha boli:
“Bro tu Riya kofilter()kar raha hai… par sach bataun?
Riya ne tujhe pehle hi reject condition mein daal diya tha.”
Aman quietly opened his phone.
Tap… tap…
Neha blocked.
Rohit:
“Bhai ab samajh aaya… Aman ka favourite JavaScript method hai
block()— jo JS mein exist bhi nahi karta.”
Savage.
🧮 reduce() - Life Experiences Add Up
The kettle was empty. Liquor tea finished.
But Aman said something deep.
"Bhai jo bhi hota hai life mein… sab experience add hote rehte hain, bilkul
reduce()ke accumulator ki tarah.
That’s exactly what reduce() does. It reduces an array to a single value.
Code
let numbers = [1,2,3,4];
let total = numbers.reduce(function(accumulator, current){
return accumulator + current;
}, 0);
console.log(total);
Output
10
Step by Step
0 + 1 = 1
1 + 2 = 3
3 + 3 = 6
6 + 4 = 10
Everything adds up eventually.
☕ Final Hostel Wisdom
After finishing his tea Aman said:
"Programming and love life are surprisingly similar."
People enter your life → push()
People leave suddenly → pop()
Some appear unexpectedly → unshift()
Some disappear without warning → shift()
Some change you → map()
Some must be filtered out → filter()
And all experiences accumulate → reduce()
Rohit ended the night by saying:
"Bro next time instead of love story… learn React hooks."
Everyone laughed. And we realized something. Sometimes JavaScript teaches life lessons too.
😂 The Real Bug in the Story
At this point the liquor tea kettle was empty, the WiFi stopped working, and Aman had finished explaining his entire heartbreak using JavaScript.
For a moment… the room became silent.
Then Rohit looked at Aman and said:
“Bhai ek baat bolu?”
Aman:
“Haan bol.”
Rohit:
“Tu JavaScript array methods toh samajh gaya…
bas signals samajhne mein thoda late ho gaya.”
Whole room exploded.
Someone from the corner added:
“Bhai Riya ne tujhe
filter()nahi kiya…
usne toh directskip()kar diya.”
Aman sighed, opened VS Code, and said:
“Theek hai… love life toh crash ho gayi.
Chalo code hi likhte hain.”
And that’s the moment every engineering student understands:
Love life: Error
Assignments: Pending
Code: Still compiling
But one thing was clear that night.
We didn’t just learn JavaScript array methods.
We also learned the most important rule of programming and life:
Always handle exceptions properly.
Because sometimes…
try {
love();
} catch (heartbreak) {
learnJavaScript();
}
And honestly?
That’s probably the best fallback function ever written. 😄




