当前位置:网站首页>Uncaught SyntaxError: Octal literals are not allowed in strict mode.
Uncaught SyntaxError: Octal literals are not allowed in strict mode.
2022-07-25 13:23:00 【刺心疯】
js控制台报错:Uncaught SyntaxError: Octal literals are not allowed in strict mode.
代码场景:

错误原因是:JS严格模式禁止使用八进制字面量,在我的if判断中使用了0开头的001,并且不是字符串。
改成下面就解决了:

这就解决这个报错问题了!
温馨提示:开发中还是要严格根据跟后台商量好的数据类型来写代码
边栏推荐
- How to realize the configuration method of user password free login?
- The migration of arm architecture to alsa lib and alsa utils is smooth
- 说说对hashcode和equals方法的理解?
- The interviewer asked me: how much do you know about MySQL's storage engine?
- Online Learning and Pricing with Reusable Resources: Linear Bandits with Sub-Exponential Rewards: Li
- 【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享
- Detailed explanation of the training and prediction process of deep learning [taking lenet model and cifar10 data set as examples]
- pytorch创建自己的Dataset加载数据集
- 面试官问我:Mysql的存储引擎你了解多少?
- Atcoder beginer contest 261 f / / tree array
猜你喜欢
随机推荐
ESP32-C3 基于Arduino框架下Blinker点灯控制10路开关或继电器组
Generate SQL script file by initializing the latest warehousing time of vehicle attributes
【GCN-RS】Learning Explicit User Interest Boundary for Recommendation (WWW‘22)
【GCN】《Adaptive Propagation Graph Convolutional Network》(TNNLS 2020)
Pycharm cannot input Chinese solution
Substance designer 2021 software installation package download and installation tutorial
Handwriting a blog platform ~ first day
Jupyter Notebook介绍
Common operations for Yum and VIM
Introduction to jupyter notebook
Introduction to web security UDP testing and defense
卷积神经网络模型之——LeNet网络结构与代码实现
Online Learning and Pricing with Reusable Resources: Linear Bandits with Sub-Exponential Rewards: Li
OAuth, JWT, oidc, you mess me up
安装mujoco报错:distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1
录制和剪辑视频,如何解决占用空间过大的问题?
[ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)
Shell common script: judge whether the file of the remote host exists
Cv2.resize function reports an error: error: (-215:assertion failed) func= 0 in function ‘cv::hal::resize‘
JS Array indexOf includes sort() 冒号排序 快速排序 去重和随机样本 random









