Why can't I print the value of indexOf in this way?

function  uniq() {
    var arr=[].slice.call(arguments);
    arr.forEach(function(a){
        console.log(a); //a
        console.log(arr.indexOf(a));  //index
        if(arr.indexOf(a)!=arr.lastIndexOf(a)){
            arr=arr.splice(arr.indexOf(a),1);
        }
    });
    return arr;
}
uniq([false, true, undefined, null, NaN, 0, 1, {}, {}, "a", "a", NaN]);

I have tried to use the for loop, but I still haven"t printed out all the index values. I can only print the index:0, of false all the time. Is this related to the elements in the array? but I have tried to print arr= [false, true, undefined, null, NaN, 0,1, {}, {}, "averse," indexing, NaN] and manually typing arr.indexOf (true) can be printed

.
Mar.01,2021

you might as well add [0]
var arr= [] .slice.call (arguments [0]) to your arguments;
try

again.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3db72-2b901.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3db72-2b901.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?