const str = "2024-01-15";
const result = str.replace(/(\d+)-(\d+)-(\d+)/, "$3/$2/$1");
const s2 = "abc".padStart(6, "12");
const s3 = [..."hello"].reverse().join("");
console.log(result, s2, s3);
Post #3419
2.2K
CHALLENGE
- 👍 4
- ❤ 2
- 🔥 2