Docs
/
numbers

Numbers

This file contains functions that are related to numbers.

sum

Link Copied!

Calculates the sum of an array of numbers.

sum([1, 2, 3, 4, 5])
15
Result

mean

Link Copied!

Calculates the mean of an array of numbers.

mean([1, 2, 3, 4, 5])
3
Result

average

Link Copied!

Calculates the mean of an array of numbers.

average([1, 2, 3, 4, 5])
3
Result

margin

Link Copied!

Calculates the margin based on a percentage.

margin(1234, 33)
407.22
Result

addMargin

Link Copied!

Adds the margin to the value.

addMargin(1234, 33)
1641.22
Result

subtractMargin

Link Copied!

Subtracts the margin from the value.

subtractMargin(1234, 33)
826.78
Result

addMarkup

Link Copied!

Adds the markup to the value.

subtractMargin(1234, 33)
1641.22
Result

subtractMarkup

Link Copied!

Calculates the markup based on a percentage.

subtractMarkup(1234, 33)
927.82
Result

median

Link Copied!

Calculates the median of an array of numbers.

median(1,2,3,4,5)
3
Result

mode

Link Copied!

Calculates the mode of an array of numbers.

mode(1,2,3,4,5)
Result

min

Link Copied!

Finds the minimum value in an array of numbers.

min(JSON.parse(value))
1
Result

max

Link Copied!

Finds the maximum value in an array of numbers.

max(1,2,3,4,5)
5
Result

minMax

Link Copied!

Returns the minimum and maximum values in an array of numbers.

minMax(1,2,3,4,5)
[ 1, 5 ]
Result

range

Link Copied!

Returns the difference between two values, expressed as a positive number.

range([1, 2, 3, 4, 5])
4
Result

standardDeviation

Link Copied!

Returns the standard deviation of an array of numbers.

standardDeviation([1, 2, 3, 4, 5])
1.4142135623730951
Result

skewness

Link Copied!

Returns the measure of asymmetry of the probability distribution of an array of numbers. The skewness value can be positive, zero, negative, or undefined.

skewness([1, 4, 30])
3.0557739000180533
Result