Calculator representation through JavaScript