我想提醒/提示console.log()
.
如何提醒/提示 - console.log("I want to eat" + " " + food);
?我试过alert("I want to eat" + " " + food);
了,但似乎无效。
例如
<script>
var foodDemand = function(food) {
console.log("I want to eat" + " " + food);
};
foodDemand("Fried Chicken");
</script>
如何提醒/提示 - console.log("I want to eat" + " " + food);
?我试过alert("I want to eat" + " " + food);
了,但似乎无效。
foodDemand("Fried Chicken");
在控制台中产生:
"I want to eat Fried Chicken"
我怎样才能得到相同的prompt();
or alert();
?