A label tag in my page looks like
<label>helloworld</label>
I want to append some arbitrary text to "helloworld" such that it becomes
<label>helloworld arbitrarytext</label>
This cannot be hardcoded as in many other posts suggest since that arbitrarytext always changes depending on my jquery. One way I am thinking is to remove the text and append string variable to the existing text and put it back, but it still feels not elegant and inefficient. Do anyone know any feature of jquery or javascript that can do this easily? Thanks!
<label>helloworld $arbitrarytext</label>sprintf()library, but that's seriously overkill for this task.