TGViewer
Web Development - HTML, CSS & JavaScript Web Development - HTML, CSS & JavaScript @javascript_courses · 55.7K subscribers
Post #3613 2.4K
Key Difference:

• slice(): Does not modify original. Extracts elements. Returns copied portion.

• splice(): Modifies original. Adds/removes/replaces. Returns removed elements.

50. What are push(), pop(), shift(), and unshift()?

Methods that modify arrays.

• push(): Add to END → arr.push(3)

• pop(): Remove from END → arr.pop()

• unshift(): Add to START → arr.unshift(0)

• shift(): Remove from START → arr.shift()

Quick Memory Trick:

push/pop = END, unshift/shift = START

❤️ Double Tap For Part 6
  • ❤ 2
More from @javascript_courses
  1. Oct 7, 2026𝗠𝗮𝘀𝘁𝗲𝗿 𝗣𝗼𝘄𝗲𝗿 𝗕𝗜 𝗳𝗼𝗿 𝗙𝗥𝗘𝗘! 🔥 Learn Power BI through these FREE learnin…
  2. Oct 4, 2026DSA Handwritten Notes
  3. Sep 28, 2026To learn web design and development from basic to advanced levels, you can follow these st…
  4. Sep 27, 202610 Websites Every Developer & AI Enthusiast Should Bookmark ✅ roadmap.sh – Step-by-step le…
  5. Sep 26, 2026🔹 Escape Characters 2️⃣5️⃣ New Line You can use \n and \t: const message1 = "Hello\nWorld…
  6. Sep 26, 2026const fileName = "report.pdf"; console.log(fileName.endsWith(".pdf")); // true 🔹 Finding…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →