add javascript amazing1 blog 's answer