Skip to content

Commit

Permalink
Change message to function, call function (still not fully correct, t…
Browse files Browse the repository at this point in the history
…hough)
  • Loading branch information
kitt committed Apr 7, 2012
1 parent c4a56ce commit df8d896
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions part_04.html
Expand Up @@ -199,9 +199,9 @@ <h2>reusable code that does something!</h2>
color: window.prompt('Favorite Color'),
tool: window.prompt('Analog Printer?'),
count: window.prompt('Favorite Number?'),
message: answers.count + ' ' + answers.color + ' ' + answers.tool + 's',
message: function() { return answers.count + ' ' + answers.color + ' ' + answers.tool + 's'; },
annoy: function(){
alert('You told us: ' + answers.message);
alert('You told us: ' + answers.message());
}
};
answers.annoy();</pre>
Expand Down Expand Up @@ -309,4 +309,4 @@ <h2>reusable code that does something!</h2>

<script src="slides.js"></script>

</body> </html>
</body> </html>

0 comments on commit df8d896

Please sign in to comment.