-3

Hello, how convert my string let = "a,b,c"; to "a","b","c"

Example:

let lang = "a,b,c";
// Convert ['a', 'b', 'c'];

1 Answers1

2

You can split the string using the comma (,) string:

let lang = "a,b,c";
console.log(lang.split(','));
Dekel
  • 57,326
  • 8
  • 92
  • 123