Created
March 24, 2024 05:41
-
-
Save hassanuos/847b89401b8fab97cfe3db3fb58d3653 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
let vals = []; | |
'["small","medium","large","extra-large"]'.split('"').forEach(function(value){ | |
if(![']', ',' , '['].includes(value)){ | |
vals.push(value); | |
} | |
}); | |
console.log(vals.join(',')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment