Didn't we have that recently?
Search for e.g. Obi-wan's scripting of conditional text.
See DOM documentation.
As far as I can see nothing changed between CS6 and CC 2015.4 when it comes to conditional text.
So you could use the easily searchable documentation here:
A direct link to documentation on the web:
Another method would be to move text to added notes and move text out of added notes.
Problem using notes: The end user could easily remove notes by editing text without knowing.
If the script is for your personal use, notes could be an option to consider.
Also this was already discussed some years ago.
Here's an idea you might consider, just setting the color of the character or paragraph style to none. Of course, with this, the text still takes up space. But then you could also set its leading to 0.
var docRef = app.documents.item(0);
var styleRef = docRef.paragraphStyles.itemByName("Changeable");
styleRef.fillColor = "None";
Just a thought,