Created
March 26, 2020 01:58
-
-
Save hw0k/c8f1ef09a32f9db746d456034dcb4eff to your computer and use it in GitHub Desktop.
LID 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rec: Rectangle = new Rectangle(); | |
rec.width = 3; | |
rec.height = 4; | |
console.log(rec.area === 12); // true | |
const rec2: Rectangle = new Square(); | |
rec2.width = 3; | |
rec2.height = 4; | |
console.log(rec.area === 12); // false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment