Sure you can use
myElement.style.display = 'none'; // to hide
myElement.style.display = 'block'; // to unhide
You need to identify the myElement as in other examples.
Please keep in mind this is not a security measure if the data needs to be not shown at all user visibility rules or conditional filters.