Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Ashish Kamble kambleaa007

🎯
Focusing
Block or report user

Report or block kambleaa007

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kambleaa007
kambleaa007 / code
Created Jun 24, 2019
code for function
View code
function retByOrder(var arr){
return arr.sort((a,b) => (a.rank > b.rank) ? 1 : ((b.rank > a.rank) ? -1 : 0));
}
function retByAverage(){
var it = arr.values();
var avg=0;
for(let i=0;i<arr.length;i++){
avg = avg+it.next().value
}
You can’t perform that action at this time.