Codes from my JavaScript class taken in 2010