Math.hypot

Returns the square root of the sum of squares of its arguments.

Syntax

hypot(...values)

Parameters

Return value

A number.

Examples

Math.hypot(3, 4)
5
arr = [1, 2, 3]
Math.hypot(...arr)
3.7416573867739413