Bhavesh Jadhavbhaveshjadhav.hashnode.dev·Aug 4, 2024Today’s JavaScript Discovery: slice vs. splice - What’s the Difference?Hey folks, I had a bit of a "Eureka!" moment today while working with JavaScript arrays. If you’ve ever used slice and splice, you might have wondered what exactly sets them apart. Well, I dug into it and thought I’d share what I found. Let’s dive ri...10 likesJavascript BasicsJavaScript
Jemin Kikanijemin.hashnode.dev·Feb 28, 2024Day 5 : how many String Methods in javascript with example ?● String length ● String slice() ● String substring() ● String substr() ● String replace() ● String replaceAll() ● String toUpperCase() ● String toLowerCase() ● String concat() String Length:- ● String trim() ● String trimStart() ● String tr...padEnd()
Mehak Baharmehakbahar.hashnode.dev·Nov 12, 2023How to Actually Copy an Object & Not Only Reference ItConsider of a case in JavaScript var a = [1,2,3,4,5]; var b = a; b.pop(); console.log(b);// output will be [1,2,3,4] console.log(a);// surprisingly output will be [1,2,3,4] The same is true with objects (as arrays themselves are a type of object). B...JavaScript