Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Return the average of the given array rounded down to its nearest integer.

function getAverage(marks){
  //TODO : calculate the downward rounded average of the marks array
  return Math.floor(marks.reduce((x,y) => x + y) / marks.length);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: convert Float64Array to array in js 
Javascript :: jshint ignore 
Javascript :: getDataSnapshotFirebase 
Javascript :: multiply arrays javascript 
Javascript :: set cookie using nest js 
Javascript :: Material-ui camera icon 
Javascript :: return all trs in a table jqueyr 
Javascript :: react native float upto 2 digits 
Javascript :: add json object to json array javascript 
Javascript :: how to read a csv file in nodejs 
Javascript :: add dark mode to react 
Javascript :: using fetch api 
Javascript :: next js page loader 
Javascript :: delete message discord.js 
Javascript :: remove repetition 2d array javascript 
Javascript :: what is vanilla javascript 
Javascript :: print chart js 
Javascript :: react 18 render 
Javascript :: react native new project mac 
Javascript :: create select option using jquery 
Javascript :: javascript trim string 
Javascript :: moment get timestamp 
Javascript :: EACCES: permission denied 
Javascript :: html to pdf javascript 
Javascript :: jQuery get background image url of element 
Javascript :: how to generate a random salt in nodejs 
Javascript :: check checkbox by jquery 
Javascript :: Contact form tutorial next.js 
Javascript :: onload submit form only once 
Javascript :: unidirectional data flow react 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =