当前位置:网站首页>2.13 weekly report
2.13 weekly report
2022-07-06 03:36:00 【m0_ sixty-three million seven hundred and thirteen thousand two】
Built-in objects
Js The language comes with , For developers , Provide necessary functions (Math Array String Date)
Math object ( Not a constructor ):Math.PI PI Math.ceil() Rounding up , That is, take the larger value
Math.round() rounding (.5 special , Take it from the big one ) Math.abs() The absolute value Math.floor() Rounding down , That is, take the small value
Math.random() Returns a random decimal number [0,1)
A random number between two numbers , And include these two numbers
Date object (Date): If there are no parameters , Returns the current time of the system
Common writing of parameters Digital 2019,10,01 String type ‘2019-10-1 8:8:8’
Format date 
Get the total number of milliseconds ( distance 1970.1.1)
Countdown cases :
Variable attribute differences
identical : Are used to store data
Different : Variable declaration and assignment Write the variable name directly Exist alone
Attribute in object There is no need to declare When used, it is object . attribute
The difference between function and method
identical : To achieve a function Do something
Different : Functions are declared separately Call function name () Exist alone Method is inside the object Different calls
character string
- String immutable
The inner value remains unchanged , Changing the content is actually changing the address , Memory opens up a memory space
- Return position according to character
str.indexOf(‘ Characters to find ’, The starting position )

- Returns the character according to the position
charAt(index) str.charAt(index) Return character
charCodeAt(index) str.charCodeAt(index) Return character's ASCII code
str[index] Compatibility
- Splice and intercept strings
Splicing : var str= ‘Andy’;
str.concat(‘red’)
Intercept :str.substr(‘ Intercept start position ’,’ Intercept a few characters ’)
- Replace string Convert to array (185)
Replace :str.replace(‘a’,‘b’) hold a Replace with b Just replace one
Convert to array :split(‘ Separator ’) String separator str.split(‘ Separator ’)
- Case study (183 184)
data type
Simple data type ( Basic data type , Value type )
string number Boolean undefined null( For an empty object )
Stack : Opening up space directly puts value
Complex data type ( Reference type ): adopt new Keyword created objects (Object Array Date)
First store the address on the stack ( Hexadecimal ) Then point to the data in the heap
Web APIs
Page interaction function
API:( Application programming interface ) Some predefined functions , Help us realize some function
Web API: It is a set of operating browser functions and page elements provided by the browser API
边栏推荐
- Computer graduation project asp Net fitness management system VS development SQLSERVER database web structure c programming computer web page source code project
- 2.1 rtthread pin device details
- Safety science to | travel, you must read a guide
- 【SLAM】lidar-camera外参标定(港大MarsLab)无需二维码标定板
- Remote Sensing Image Super-resolution and Object Detection: Benchmark and State of the Art
- 适合程序员学习的国外网站推荐
- BUAA magpie nesting
- 遥感图像超分辨重建综述
- Shell 传递参数
- Yyds dry inventory what is test driven development
猜你喜欢

2. GPIO related operations

Derivation of anti Park transform and anti Clarke transform formulas for motor control

Cubemx transplantation punctual atom LCD display routine

three. JS page background animation liquid JS special effect

Overview of OCR character recognition methods

Pytorch基础——(1)张量(tensor)的初始化
![[slam] orb-slam3 parsing - track () (3)](/img/87/b580837778c2c9f6bac5ba49403d6b.png)
[slam] orb-slam3 parsing - track () (3)

Svg drag point crop image JS effect

BUAA calculator (expression calculation - expression tree implementation)

SWC介绍
随机推荐
3.1 rtthread 串口设备(V1)详解
2.1 rtthread pin device details
ESBuild & SWC浅谈: 新一代构建工具
ASU & OSU | model based regularized off-line meta reinforcement learning
MADDPG的pythorch实现——(1)OpenAI MADDPG环境配置
How to choose PLC and MCU?
Deno介绍
Erreur de la carte SD "erreur - 110 whilst initialisation de la carte SD
蓝色样式商城网站页脚代码
NR modulation 1
Problems encountered in 2022 work IV
数据分析——seaborn可视化(笔记自用)
How to write compile scripts compatible with arm and x86 (Makefile, cmakelists.txt, shell script)
Force buckle 1189 Maximum number of "balloons"
SAP ALV color code corresponding color (finishing)
Safety science to | travel, you must read a guide
2. GPIO related operations
BUAA calculator (expression calculation - expression tree implementation)
SAP ALV单元格级别设置颜色
Pelosi: Congress will soon have legislation against members' stock speculation