Cam,
Your issue is that the id of the layer is not the layer name normally it is something like:
view.map.findLayerById("Hazards_Uptown_Charlotte_665").visible = false;
If you do not know the exact layer id then you first have to loop through the maps layers and check the layers title or name to see if it matches 'cool layer' and get that layers actual id.