当前位置:网站首页>JS string and array methods
JS string and array methods
2022-07-03 05:04:00 【The wind blows and birds fly in the crotch】
JS String method :
indexOf Look back before ( Commonly used lastIndexOf Look backwards
indexOf Has two functions
1. You can detect the position of elements in the array
2. You can detect whether there is this element in the array ( duplicate removal )
charAt understand str[1]
charCodeAt understand
slice Intercept
substr
substring
replace String substitution , It can only be replaced once
split Turn a string into an array Split
toUpperCase Convert to uppercase
toLowerCase Convert to lowercase
JS Array method :
reverse Flip
sort Sort
push Add... From the back
unshift Add... From the front
pop Delete... From the back
shift Remove... From the front
indexOf From front to back string index
lastIndexOf String index from back to front
join,toString Convert to string type , It is recommended to use join
concat Become
slice Intercept ( A large array is only a part of a fragment )
splice Delete
————————————————
Copyright notice : This paper is about CSDN Blogger 「 The wind blows and birds fly in the crotch 」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/m0_66477165/article/details/122608744
边栏推荐
- Gbase8s composite index (I)
- Sprintf formatter abnormal exit problem
- 并发操作-内存交互操作
- M1 Pro install redis
- [set theory] relation properties (transitivity | transitivity examples | transitivity related theorems)
- Silent authorization login and registration of wechat applet
- [research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached
- [luatos sensor] 2 air pressure bmp180
- [develop wechat applet local storage with uni app]
- Automatic voltage rise and fall 5-40v multi string super capacitor charging chip and solution
猜你喜欢

ZABBIX monitoring of lamp architecture (2): ZABBIX basic operation

Do you know UVs in modeling?

Mobile terminal - uniapp development record (public request encapsulation)

leetcode406. Rebuild the queue based on height
![[clock 223] [binary tree] [leetcode high frequency]: 102 Sequence traversal of binary tree](/img/0f/bc8c44aee7a2c9dccac050b1060017.jpg)
[clock 223] [binary tree] [leetcode high frequency]: 102 Sequence traversal of binary tree

Unity tool Luban learning notes 1

Handling record of electric skateboard detained by traffic police

Compile and decompile GCC common instructions

Thesis reading_ ICD code_ MSMN

Use Sqlalchemy module to obtain the table name and field name of the existing table in the database
随机推荐
第十九届浙江省 I. Barbecue
Online VR model display - 3D visual display solution
[set theory] relationship properties (common relationship properties | relationship properties examples | relationship operation properties)
1094 the largest generation (25 points)
Market status and development prospect prediction of the near infrared sensor industry of the global Internet of things in 2022
The process of browser accessing the website
SSM framework integration
Do you know UVs in modeling?
The programmer resigned and was sentenced to 10 months for deleting the code. JD came home and said that it took 30000 to restore the database. Netizen: This is really a revenge
Market status and development prospect prediction of global fermentation acid industry in 2022
Automatic voltage rise and fall 5-40v multi string super capacitor charging chip and solution
动态规划——相关概念,(数塔问题)
document. The problem of missing parameters of referer is solved
Prepare for 2022 and welcome the "golden three silver four". The "summary of Android intermediate and advanced interview questions in 2022" is fresh, so that your big factory interview can go smoothly
JQ style, element operation, effect, filtering method and transformation, event object
leetcode406. Rebuild the queue based on height
Analysis of proxy usage of ES6 new feature
1118 birds in forest (25 points)
Class loading mechanism (detailed explanation of the whole process)
How to connect the network: Chapter 1 CSDN creation punch in