Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/math/index.ts>avg

A JavaScript extension package for building strong and modern applications.
Latest
function avg
import { avg } from "https://deno.land/x/ayonli_jsext@v0.9.72/math/index.ts";

Returns the average value of the given values.

Examples

Example 1

import { avg } from "@ayonli/jsext/math";

console.log(avg(1, 2, 3)); // 2
console.log(avg(1, 2, 3, 4, 5)); // 3

Parameters

...values: number[]

Returns

number