Answers for "remove duplicates from array in javascript"

PHP
18

how to remove duplicates from an array

<?php
$fruits_list = array('Orange',  'Apple', ' Banana', 'Cherry', ' Banana');
$result = array_unique($fruits_list);
print_r($result);
?>
  
Output:

Array ( [0] => Orange [1] => Apple [2] => Banana [3] => Cherry )
Posted by: Guest on March-04-2020
50

js delete duplicates from array

const names = ['John', 'P
Posted by: Guest on March-11-2020

Code answers related to "remove duplicates from array in javascript"

Browse Popular Code Answers by Language