In javascript, what's the difference between style.visibility and style.display?

so I got this: document.getElementById("flashy").style.visibility="hidden"; document.getElementById('flashy').style.display = 'none'; I've tried each of them at different times, and both seem to have the same effect. My question is what's the difference between them.... show more so I got this:
document.getElementById("flashy").styl...
document.getElementById('flashy').styl... = 'none';

I've tried each of them at different times, and both seem to have the same effect. My question is what's the difference between them. Is one an outdated version of the other? Should I prefer one of them?



As an added bonus, one more question: notice both lines. One uses " " while the other one uses ' '. Again, both seem to work just fine. Is there any difference between them? Should I use one of them for some reason?
3 answers 3