I have text on a page, its in a <h3> tag, which has a class ms-standardheader, but there are other texts on the page with the same class in its own <h3> tag. I also know the text I want to hide is ‘Session’.
With this how can I write a javascript function to hide only this text?
Here is an image of the developtools from IE.

I’d suggest, if you’re restricted (as your tags suggest) to non-library plain JavaScript, the following:
JS Fiddle demo.
References:
push().document.getElementsByTagName().element.className.node.nodeValue.indexOf().