Tag JavaScript string manipulation for beginners