Quantcast
Viewing latest article 36
Browse Latest Browse All 43

Answer by Chamilyan for how to prevent duplicate in array push in angularjs

To filter duplicates in an array (es6):

let arr = ['foo', 'foo', 'bar', 'baz'];Array.from(new Set(arr));console.log(arr);// ['foo', 'bar', 'baz'];

Viewing latest article 36
Browse Latest Browse All 43

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>