gpt4 book ai didi

javascript - log = console.log, 抛出非法调用错误

转载 作者:行者123 更新时间:2023-12-04 08:33:29 27 4
gpt4 key购买 nike

<分区>

我有一个 javascript 文件,它是 console.log 的简写,

var log = console.log
log("this message is logged with shortened keyword")

在运行时,它会抛出错误,

Uncaught TypeError: Illegal invocation

Jsfiddle ---- https://jsfiddle.net/w42vp7zg/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com