webveuje/es6/a.js
2021-03-23 10:58:10 +08:00

10 lines
158 B
JavaScript

const sqrt = Math.sqrt;
function square(x) {
return x * x;
}
function diag(x, y) {
return sqrt(square(x) + square(y));
}
export {sqrt, square, diag}