I was following this tutorial on YouTube Learn JavaScript - Full Course for Beginners .
var magic = function() {
return new Date();
};
alert(magic);
This code snippet is shown on 2:47:17. My question is now when I want to show the value of the variable magic as an alert I only get some rubbish out. I would expect to receive the value of new Date() but I get some code out.
Aucun commentaire:
Enregistrer un commentaire