Skip to content

Commit 284692e

Browse files
committed
Add usage
1 parent 5226aae commit 284692e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

JavaScript/3-class.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ class Point {
2121
}
2222
}
2323

24+
const point1 = new Point(0, 0);
25+
point1.move(1, -1);
26+
point1.move(10, 0);
27+
28+
const point2 = Point.from(point1);
29+
point2.move(-7, 25);
30+
2431
console.log('Point prototype:', Point.prototype);
2532
console.log('move prototype:', Point.prototype.move.prototype);
2633
console.log('constructor prototype:', Point.constructor.prototype);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy