javascript rep