Google chrome devtools console.log in devtools-新用户

Google chrome devtools console.log in devtools-新用户,google-chrome-devtools,Google Chrome Devtools,在devtools控制台上使用codeschool时,我很高兴使用console.log打印出他们告诉我的内容。然后我使用console.assert检查一些语句。然后我应该再次使用console.log(?)打印出最后一个字符串 我得到的不是字符串,而是未定义的。就像日志方法被破坏一样。显然这里有一个教训,但是什么呢?嗯。。。这对我很有用: > console.log("A"); A undefined > console.assert(1 == 1); undefined >

在devtools控制台上使用codeschool时,我很高兴使用console.log打印出他们告诉我的内容。然后我使用console.assert检查一些语句。然后我应该再次使用console.log(?)打印出最后一个字符串


我得到的不是字符串,而是未定义的。就像日志方法被破坏一样。显然这里有一个教训,但是什么呢?

嗯。。。这对我很有用:

> console.log("A");
A
undefined
> console.assert(1 == 1);
undefined
> console.assert(1 == 2);
Assertion failed:
undefined
> console.log("B");
B
undefined

你能把你放在控制台上的确切台词贴出来吗。