Last active
April 10, 2019 20:24
-
-
Save mohamed-gara/2df16fd8993f9b7fd8e19d7885b93604 to your computer and use it in GitHub Desktop.
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
import {Order} from './order'; | |
export class Customer { | |
constructor(public orders: Order[]) {} | |
discount() { | |
if (this.orders.length > 5) { | |
return 10; | |
} else { | |
return 3; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment