LoginSignup
1
0

More than 5 years have passed since last update.

文字が要素の配列で重複していない文字だけ取り除く

Posted at

結論

("js".repeat(5)+"bavcab").split("").filter(function (e, i, self) {return self.filter(function (_e) {return _e===e}).length>=2})

この場合はvcが配列から消える

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0