hello.js 384 B

123456789101112131415161718
  1. var coffee, message;
  2. message = "ready for some coffee ?";
  3. coffee = function(msg = message) {
  4. var answer;
  5. answer = confirm(msg);
  6. return `Your answer is ${answer}`;
  7. };
  8. alert(coffee()); // <- parentheses needed.
  9. alert(coffee("Chocolate ?"));
  10. //`Best practice: parentheses always except at the outermost level.
  11. alert(coffee("Tea, maybe ?"));
  12. //# sourceMappingURL=hello.js.map