₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,067 members, 8,420,138 topics. Date: Thursday, 04 June 2026 at 12:03 PM

Toggle theme

Lets Solve Some Javascript Problems - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingLets 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

1 Reply

Check In: Submit Your C++ Questions Lets SolveLets Solve Some Javascript ProblemsJavascript Problems234

Have An App Idea, What Next?Zerodium Offers $3,000,000 Bounty For A Successful Jailbreak Of IOS 9Graphic Designer Needed For A Logo