Skip to content

Instantly share code, notes, and snippets.

View ThomasPCG's full-sized avatar

Thomas (Pacific Consulting Group) ThomasPCG

View GitHub Profile
@ThomasPCG
ThomasPCG / keybase.md
Last active March 27, 2018 10:36
keybase.md

Keybase proof

I hereby claim:

  • I am thomaspcg on github.
  • I am thomaslim (https://keybase.io/thomaslim) on keybase.
  • I have a public key ASD4qKKft8SzxPkT93lnOSzr2jb1-ruZ3jJH_Dw6lL9L9Qo

To claim this, I am signing this object:

@ThomasPCG
ThomasPCG / leapyears.js
Last active June 7, 2018 09:27
Checking and getting leap years in pure Node.js
//Check if parameter yr is a leap year.
var isLeapYear = function(yr) {
return (((yr % 4 === 0) && (yr % 100 !== 0)) || (yr % 400 === 0));
};
//Get leap year
// Paramaters:
// yr - starting year
// iteration - number of years to print out
// count - internal variable for tracking