Last active
April 10, 2019 20:29
-
-
Save mohamed-gara/0ab8fb3a48e25ec5d271efbcb3575cdd 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(private 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