var propertiesToTest = ["prop1", "prop2", "prop3"];
if (propertiesToTest.every(function(x) { return x in a; })) 
    console.log("a has these properties:'prop1, prop2 and prop3'");