括号中的Console.log错误 [英] Console.log error in Brackets
问题描述
每次我尝试使用console.log时,都会出现此类错误。
Every time i try to use console.log i get this kind of error.
错误:意外的控制台语句。 [无控制台] console.log(name +’
是’+年龄+’岁’+工作+结婚的人’+ isMarried +
’。); 36错误:未定义控制台。
[no-undef] console.log(name +’是’+年龄+’岁’+工作+’已婚的
’+ isMarried +’。); 44错误:意外的控制台
语句。 [no-console] console.log(name +’是‘+年龄+’岁
岁’+工作+结婚的人’+ isMarried +’。); 44错误:未定义
控制台。 [no-undef] console.log(name +'是'+年龄
+'岁'+工作+已婚'+ isMarried +'。');
ERROR: Unexpected console statement. [no-console] console.log(name + ' is a ' + age + ' years old ' + job + ' who is married ' + isMarried + ' . '); 36 ERROR: 'console' is not defined. [no-undef] console.log(name + ' is a ' + age + ' years old ' + job + ' who is married ' + isMarried + ' . '); 44 ERROR: Unexpected console statement. [no-console] console.log(name + ' is a ' + age + ' years old ' + job + ' who is married ' + isMarried + ' . '); 44 ERROR: 'console' is not defined. [no-undef] console.log(name + ' is a ' + age + ' years old ' + job + ' who is married ' + isMarried + ' . ');
此行上的错误是什么
推荐答案
如果不想更改.eslintrc文件,然后
添加以下两行以在整个.js文件中完全禁用它:
If you don't want to make change to .eslintrc file then add these two lines to disable it completely in the whole .js file:
/ *全局控制台* /
/ * eslint无控制台: off * /
这篇关于括号中的Console.log错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!