当前位置:网站首页>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,并且不是字符串。
改成下面就解决了:

这就解决这个报错问题了!
温馨提示:开发中还是要严格根据跟后台商量好的数据类型来写代码
边栏推荐
- 好友让我看这段代码
- Excel add key run macro
- Masscode is an excellent open source code fragment manager
- ESP32-C3 基于Arduino框架下Blinker点灯控制10路开关或继电器组
- 备战2022 CSP-J1 2022 CSP-S1 初赛 视频集
- Install mujoco and report an error: distutils.errors DistutilsExecError: command ‘gcc‘ failed with exit status 1
- How to understand metrics in keras
- pytorch创建自己的Dataset加载数据集
- Design and principle of thread pool
- Introduction to jupyter notebook
猜你喜欢

Convolutional neural network model -- vgg-16 network structure and code implementation

Excel add key run macro

Connotation and application of industrial Internet

JS Array indexOf includes sort() 冒号排序 快速排序 去重和随机样本 random

【服务器数据恢复】HP EVA服务器存储RAID信息断电丢失的数据恢复

VIM tip: always show line numbers

Programmer growth chapter 27: how to evaluate requirements priorities?

【AI4Code】CodeX:《Evaluating Large Language Models Trained on Code》(OpenAI)

【GCN】《Adaptive Propagation Graph Convolutional Network》(TNNLS 2020)

为提高效率使用ParallelStream竟出现各种问题
随机推荐
0715RHCSA
IM系统-消息流化一些常见问题
Docker learning - redis cluster -3 master and 3 slave - capacity expansion - capacity reduction building
Convolutional neural network model -- alexnet network structure and code implementation
0716RHCSA
Memory layout of program
6.27 uniapp项目历程
【GCN-RS】Learning Explicit User Interest Boundary for Recommendation (WWW‘22)
Friends let me see this code
二叉树基本知识
The interviewer asked me: how much do you know about MySQL's storage engine?
若依如何实现用户免密登录配置方法?
0720RHCSA
stable_baselines快速入门
Esp32-c3 is based on blinker lighting control 10 way switch or relay group under Arduino framework
R language GLM generalized linear model: logistic regression, Poisson regression fitting mouse clinical trial data (dose and response) examples and self-test questions
Docekr learning - MySQL 8 master-slave replication setup deployment
基于百问网IMX6ULL_PRO开发板移植LCD多点触摸驱动(GT911)
vim基础操作汇总
QGIS加载在线地图:高德、天地图等