webveuje/es6/a.js

10 lines
158 B
JavaScript
Raw Normal View History

2021-03-23 10:58:10 +08:00
const sqrt = Math.sqrt;
function square(x) {
return x * x;
}
function diag(x, y) {
return sqrt(square(x) + square(y));
}
export {sqrt, square, diag}