I get an error saying equals is not a function. It looks like I can’t simply use the ‘-’ here, just want to confirm if that’s the case. Would I have to multiply by -1 instead?
Javascript as a programming language doesn’t provide operation overloading. You will have to use the scale method that internally multiplies each vector element: