How create function show or hide the node?

Hello! how to create a function of visibility and hiding node with JS?

This was already answered in the original topic: How to hide nodes?