Corrected Sample & JavaScript