So I was snooping around in the editor to see if I could find an avg function, but I can’t seem to find it, neither in JavaScript nor Blocks. So after that, I decided to make it into an extension, but can anyone who has made extensions help me? This is what I have so far…

`namespace Math { //% block="avg $value" export function avg(value: Array) { let temporaryValue = 0 for (let index = 0; index < value.length; index++){ temporaryValue += index } return (temporaryValue / value.length) }`

Is there a better way to do this? I’ve hit this error with the playground editor:

Generic type ‘Array’ requires 1 or more argument(s)

Thanks