euler1 in js vanilla