I am pretty new to Javascript and I've read a few pages about Objects and Methods, but I think I'm still fuzzy on a few things I hope someone can clear things up!

function pizza()
  this.cooked = false;
  var spoiled = false;
  this.cook = cook;
  function cook(){
    cooked = true;
  function spoil(){
    spoiled = true;
Is spoil() private and cook() public?
If so then are the variables treated the same?

I am coming from a C++ background just trying to translate things over to where I'm comfortable. I'm so used to using classes I feel weird trying to program without them.

Any additional information pertaining to methods and objects that I didn't directly ask for is more than welcome.

Thank you for your time,
Happy Holidays.