A technical leader with more than 12 years of programming experience designing and building versatile APIs, growing teams and delivering products with a fantastic user experience.
Are you looking to update the value in an array but not change the original? Say hello to with(). The with function allows you to update a value in an array but return a copy with the updated value, not update the original. Pretty simple to use:
cons...
There is a good chance that replace does not work how you think:
const numbers = "10.00.00.0000"
const replaced = numbers.replace(".", "_")
console.log(replaced) // '10_00.00.0000'
Wait what? It only replaced the first instant, replace is a simple ...
Kotlin is a fantastic language. Every day, I find a new function or method that makes programming in it a breeze. One of my go-to functions I keep reaching for recently is fold. You can think of fold like a reduce; however, reduce starts with the fir...
We have been messing with arrays in the last few blogs, so let's switch gears and look at some string methods. There are a lot of built-in methods on a string, but two you might not know are padStart() and padEnd(). So what do they do? They pad a str...