evaluate and print working on js version