₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,176 members, 8,510,524 topics. Date: Friday, 30 October 2026 at 02:39 PM

Toggle theme

Lets Solve Some Javascript Problems - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › Lets Solve Some Javascript Problems (977 Views)

1 Reply

Lets Solve Some Javascript Problems by elvongray(op): 4:58pm On Dec 12, 2014
A vector type
Write a constructor Vector that represents a vector in two-dimensional
space. It takes x and y parameters (numbers), which it should save to
properties of the same name.
Give the Vector prototype two methods, plus and minus, that take another
vector as a parameter and return a new vector that has the sum
or difference of the two vectors’ (the one in this and the parameter) x
and y values.
Add a getter property length to the prototype that computes the length
of the vector—that is, the distance of the point (x, y) from the origin
(0, 0)
Re: Lets Solve Some Javascript Problems by abdul01(m): 11:02pm On Dec 12, 2014
Please pardon me, i know say i try sha

1 Reply

Check In: Submit Your C++ Questions Lets Solve • Lets Solve Some Javascript Problems • Javascript Problems • 2 • 3 • 4

Help; I Need Where To Learn Printing Press In Lagos • Reviews On Top Four Social Media Network • Paas Innovation: Inovation And The Need For A ‘fail Fast’ Mentality