Lets Solve Some Javascript Problems - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Lets Solve Some Javascript Problems (959 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
|
Check In: Submit Your C++ Questions Lets Solve • Lets Solve Some Javascript Problems • Javascript Problems • 2 • 3 • 4
Have An App Idea, What Next? • Zerodium Offers $3,000,000 Bounty For A Successful Jailbreak Of IOS 9 • Graphic Designer Needed For A Logo