var businessDays = 10; // this will come from a form
var counter = 0; // I have a counter
var safety = 0; // I have a safety variable
var ship = today = new Date(); // I have the current date and an initialized shipping variable but the buy date will come from a form
while( ++safety <30 ){
ship.setDate( safety ); // add a number of days
switch( ship.getDay() ){
case 0: // Sunday
case 6: // …
Run Code Online (Sandbox Code Playgroud) 最近我读了一个关于"console.log做什么"的查询,我读了一个答案,尝试使用它,发现尽管答案说它在谷歌浏览器输出到控制台,我只是尝试了它,我没有输出.
我确实试过这段代码:
function put(p){
if ( window.console && window.console.log ) {
console.log(p); // console is available
}else{
alert(p);
}
}
Run Code Online (Sandbox Code Playgroud)
但是......我既没有控制台输出也没有警报,而且.log是一个数学属性,是什么赋予了它?