console不能简写吗
javascript吧
全部回复
仅看楼主
level 3
就是不能写成console.log(myname,address,age,email,gz);或者是console.log(myname address age email gz);吗?
2022年01月20日 01点01分 1
level 10
你都想到了,怎么不自己试一下呢
2022年01月20日 04点01分 2
level 2
console.log(myname,address,age,email,gz); 这可以的啊
2022年01月20日 06点01分 3
level 12
可以用格式串啊
2022年01月20日 07点01分 4
level 5
编程语言,有她自己的规则,就像女人
2022年01月21日 00点01分 5
level 6
查个文档很难吗
2022年01月21日 02点01分 6
level 2
勇敢一点
2022年01月30日 11点01分 7
level 3
为啥还用var...应该用const 或者let
2022年01月30日 14点01分 8
技术好用啥都行[呵呵]
2022年02月05日 09点02分
var怎么不行呢
2022年02月13日 09点02分
@I析境l var定义的都是全局变量,即便在block里面外界也可以访问,这都是多年年被弃用的了,百度一下不也知道
2022年02月13日 10点02分
@blahblahblah6 艹,我写变量都是var……
2022年02月13日 10点02分
level 15
自己试一下不比发贴吧要快吗
2022年01月31日 07点01分 9
level 4
定义太多了
2022年02月10日 04点02分 11
level 4
还不如var arr=[mynane,第二个,第三个,第n个]
然后console.log(arr)
2022年02月10日 04点02分 12
level 3
可以把log 解构出来,就不用每次写console了
2022年02月12日 11点02分 13
level 9
为什么不用数组呢?
2022年02月13日 10点02分 14
level 9
var information = ["……", "……", 30, "……", 2000];
//这行注释的代码输出的是 ["……", "……", 30, "……", 2000]
//console.log(information)
//下面的for循环输出数组的每一项
for (let i = 0; i < information.length; i++) console.log(information[i]);
//这不就快多了
2022年02月13日 10点02分 15
level 13
有些编辑器有快捷输入
2022年02月15日 02点02分 16
1 2 尾页