Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 
avatar of tavnab

tavnab

tavnab has asked 0 questions and find answers to 9 problems.

Stats

303
EtPoint
111
Vote count
0
questions
9
answers

About

Coder & software architect in Brooklyn, NY.

var gary = {
  name: 'Gary',
  do: function() {
    throw 'stones';
  }
};

var house {
  residents: [gary],
  material: 'glass'
};

try {
  house.residents.forEach(function(resident) {
    resident.do();
  });
} catch (thrown) {
  if (thrown === 'stones' & house.material === 'glass') {
    alert('Dammit Gary!');
  }
}