Advertisement
Guest User

Untitled

a guest
May 30th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. function Expression(label,expression){
  2. this.label = label;
  3. this.expression = expression;
  4. this.calculate();
  5. }
  6. Expression.prototype.calculate = function(){
  7. this.value = this.expression();
  8. }
  9.  
  10. var a = new Expression('dave', function(){
  11. return 'foo' + 'bar';
  12. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement