Created
October 1, 2022 09:04
-
-
Save buymed-hoangpham/7a32db267a0fcf03fa1254c47e036ffe to your computer and use it in GitHub Desktop.
excercise
This file contains hidden or 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
| function twoFer(name: string = "you"): string { | |
| return `One for ${name}, one for me` | |
| } | |
| console.log(twoFer()) | |
| console.log(twoFer("Elton")) | |
| function isLeapYear(year: number): boolean { | |
| return (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0) | |
| } | |
| console.log(isLeapYear(2012)) | |
| console.log(isLeapYear(2013)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment