How to hide a div on second click with JavaScript

I have this little script which shows my div on the first click, but I want it to hide if it is clicked again! Do I have my if…else statement wrong? <a onClick=’view()’>OTHER HTML CONTENT</a> <div id=”a” class=”superHide”><img class=”alignnone size-full wp-image-940 imgWrap” src=”http://boxingclever.net.au/wp-content/uploads/2019/10/iagLogo_300px.jpg” alt=”” width=”150″ height=”125″ /> <img class=”alignnone size-full wp-image-940 imgWrap” src=”http://boxingclever.net.au/wp-content/uploads/2019/10/TelstraLogo_300px.jpg” alt=”” width=”150″…

How to hide a div on second click with JavaScript

I have this little script which shows my div on the first click, but I want it to hide if it is clicked again! Do I have my else statement wrong? <a onClick=’view()’>OTHER HTML CONTENT</a> <div id=”a” class=”superHide”><img class=”alignnone size-full wp-image-940 imgWrap” src=”http://boxingclever.net.au/wp-content/uploads/2019/10/iagLogo_300px.jpg” alt=”” width=”150″ height=”125″ /> <img class=”alignnone size-full wp-image-940 imgWrap” src=”http://boxingclever.net.au/wp-content/uploads/2019/10/TelstraLogo_300px.jpg” alt=”” width=”150″…