diff --git a/solutions/typescript/leap/1/leap.ts b/solutions/typescript/leap/1/leap.ts new file mode 100644 index 0000000..c08cc84 --- /dev/null +++ b/solutions/typescript/leap/1/leap.ts @@ -0,0 +1,3 @@ +export function isLeap(year:number):boolean { + return (year%400 === 0) || (year%100 != 0 && year%4 === 0); +}