Last active
April 16, 2024 02:12
-
-
Save mcsee/d1d819ebfaf99b4143e2545fab928adf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pets = '😺🐶😺'; | |
const justDogs = pets.replaceAll('😺', '🐩'); | |
// Or | |
const justDogs = pets.replace(/😺/g, ''); | |
const catsArePresent = justDogs.includes('😺'); | |
// returns false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment