Skip to content
FindGlocal
codewithsarir

codewithsarir

Rehman Colony Naveed Shaheed Road Sonikot Gilgit, Gilgit Education Website

Hi, Our page is related to web development with a focus on HTML, CSS, JavaScript, and ReactJS

Photos from codewithsarir 's post 27/08/2026

Unique sidebar design with LIGHT and DARK mode

Photos from codewithsarir 's post 22/08/2026

Pure CSS navbar with Animation 🔥

Found useful?

Like comment share 🔥🧡

Photos from codewithsarir 's post 15/08/2026

Login Form switch design🔥

Found useful?

Follow. Share with your coder friend and comment your suggestions

02/08/2026

The Precision Pitfall! 🧮⚡
​If you picked (A), don't worry—JavaScript math catches almost everyone off guard at first! 🪤
​Because computers process math in binary (base-2), fractional numbers like 0.1 and 0.2 turn into infinitely repeating decimals under the hood. When added together, you get 0.30000000000000004!
​Did you guess (B) right away, or did you expect 0.3? Let me know below! 💬👇
​Hashtags:

25/07/2026

Loop Scoping Riddle! 🔄⚡

​Did this nested var loop trip you up? 🪤
​Because var isn't block-scoped, the inner loop overwrites the outer loop's iterator, and all three stored functions point to the same shared variable in memory! By the time you call tasks[0](), tasks[1](), and tasks[2](), the loops are already over.
​Did you guess (B) right away, or did the nested loop trick you? Drop your answer below! 💬👇
​Hashtags:

20/07/2026

Array Sort Trap! 🔢🤔

​If you thought the answer was (A), you just fell for one of JavaScript's oldest traps! 🪤
​By default, JS converts numbers into strings before sorting them. That's why "10" and "20" sneak in front of "5". To fix this and get a proper numerical sort, always pass a comparison function: numbers.sort((a, b) => a - b).
​Drop your initial guess in the comments—did it catch you off guard? 💬👇
​Hashtags:

18/07/2026

JavaScript Interview Check: The Default Array Sort Trap! 🧠💻

Time for a quick code review check! Look closely at the code snippet inside 1000207636.png and tell me the exact output sequence that will print out.
​This specific quirk is a favorite screening question for junior-to-mid level engineering positions because it immediately exposes who understands built-in prototype specifications versus who just guesses based on intuition.
​👉 Analyze the choices inside 1000207636.png:
​(A) [2, 5, 10, 20]
​(B) [10, 2, 20, 5]
​(C) [10, 2, 5, 20]
​(D) An Error
​No cheating by pasting this snippet into your browser console! Rely entirely on your mental compiler.
​Cast your vote in the comments and share your technical reasoning with the group below! 👇✨
​Hashtags:

13/07/2026

Loop Scoping Riddle! 🧠⚡
​Don't let the var keyword trick you. Because var is function-scoped (and not block-scoped), every function pushed into the array points to the exact same variable. By the time you call them, the loop is already over!
​Want to fix it? Just swap var for let to give each iteration its own private scope.
​Which answer did you pick first? Be honest! 🧐👇
​Hashtags:

07/07/2026

Time for another JavaScript brain teaser! 📦✨
​Take a look at the code snippet This "Object Copying Mystery" perfectly highlights how tricky reference handling can get. A lot of devs assume the spread operator completely isolates the new object from the original—but JavaScript handles nested data structures a bit differently!
​Can you solve the mystery? Put your answer in the comments! 👇
A) Sarah, 2
B) Adam, 2
C) Sarah, 1
D) Adam, 1
​Tag a fellow developer who loves tracking down subtle bugs! ☕
​

29/06/2026

JavaScript quiz time! 🧠 Can you dodge the "Object Reference Trap" shown in sni?
​This is a classic gotcha that trips up both beginners and intermediate coders alike. Understanding how memory allocation and shallow copies work under the hood will save you hours of debugging later on.
​Take a look at the code and drop your vote below! 👇
A) 'Sarah' and 2
B) 'Adam' and 2
C) 'Sarah' and 1
D) 'Adam' and 1
​Tag a developer friend who loves a good code puzzle! ☕✨
​

Alerts

Be the first to know and let us send you an email when codewithsarir posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Subscribe

We will notify you when anything happens in Gilgit.