Hye Guys, I would like to ask a question regarding python, how I can translate the following into javascript without using any external math libraries:

```
class Vector(object):
def __init__(self, coordinates):
try:
if not coordinates:
raise ValueError
self.coordinates = tuple(coordinates)
self.dimension = len(coordinates)
except ValueError:
raise ValueError('The coordinates must be nonempty')
except TypeError:
raise TypeError('The coordinates must be an iterable')
def __str__(self):
return 'Vector: {}'.format(self.coordinates)
def __eq__(self, v):
return self.coordinates == v.coordinates
def plus(self, v):
newCoordinates = [x+y for x,y in zip(self.coordinates, v.coordinates)]
return Vector(newCoordinates)
def times_scalar(self, c):
newCoordinates = [c*x for x in self.coordinates]
return Vector(newCoordinates)
def minus(self, v):
return self.plus(v.times_scalar(-1))
a = Vector([8.218, -9.341])
b = Vector([-1.129, 2.111])
c = Vector([7.119, 8.215])
d = Vector([-8.223, 0.878])
e = Vector([1.671, -1.012, -0.318])
scalar = 7.41
print("vector a plus vector b: " + a.plus(b).__str__())
print("vector c minus vector d: " + c.minus(d).__str__())
print("vector e grow by scalar c: " + e.times_scalar(scalar).__str__())```
```