fn(true,'xyz',()=>'hello',99,101);
function fn(a,b,c){
var callback = arg(arguments,'function');
console.log(callback);
var index = arg(arguments,'number',1);
console.log(index);
}//fn
function arg(args,type,index=0){
var c = 0;
var n = args.length;
for(var i=0;i<n;i++){
if(typeof args[i]==type){
if(c==index){