Home Reference Source

src/test.js

function square(x) {
    return Math.pow(x, 2)
}
const PI = 3.14;
class Point {
    constructor(x, y) {
        this.x = x;
        this.y = y;
    }
    distance() {
        return Math.pow((Math.pow(this.x, 2) + Math.pow(this.y, 2)), 0.5)
    }
}
export { square, PI, Point }