当前位置:网站首页>js takes the value of a feature at a certain position in the string, such as Huawei=> Huawei
js takes the value of a feature at a certain position in the string, such as Huawei=> Huawei
2022-08-02 03:38:00 【suzhiwei_boke】
let brandName = ' '
if (item.name.indexOf('(') !== -1) {
const index = item.name.lastIndexOf('\(') // Determine if the name has (), if so, remove it
brandName = item.name.substring(0, index)
} else {
brandName = item.name
}
Inspect two knowledge points, the string search indexOf() value is -1, it does not exist
边栏推荐
- 【程序人生】做了多年的运维,靠什么转行拿下12K+年终奖的薪资?
- display,visibility,opacity
- 啃瓜记录又一天
- FreeRTOS内核详解(1) —— 临界段保护原理
- canvas--pie chart
- UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the index ing argu
- debian 10 nat and routing forwarding
- Source Insight 使用教程(2)——常用功能
- ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- 基本运算符
猜你喜欢

Phospholipid-polyethylene glycol-thiol, DSPE-PEG-Thiol, DSPE-PEG-SH, MW: 5000

亚马逊卖家怎么提升转化率

UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the index ing argu

Redis simple study notes

URL模块

oracle inner join and outer join

C语言 十六进制整数字符串转十进制整数

活体检测 Adaptive Normalized Representation Learning for GeneralizableFace Anti-Spoofing 阅读笔记

How to check whether a table is locked in mysql

DSPE-PEG-Silane, DSPE-PEG-SIL, phospholipid-polyethylene glycol-silane modified active group
随机推荐
排序学习笔记(二)堆排序
广州华为面试总结
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
L1-020 帅到没朋友 (20分)
Deveco studio Hongmeng app access network detailed process (js)
解决glob()返回文件排序不一致问题&onnx本地按照安装方法
display,visibility,opacity
Source Insight 使用教程(2)——常用功能
Cloud server installation and deployment of Nacos 2.0.4 version
The @autowired distinguished from @ the Resource
String comparison size in MySQL (date string comparison problem)
Detailed explanation of the usage of exists in mysql
np.isnan()
nucleo stm32 h743 FREERTOS CUBE MX配置小记录
js 数组去重的常用方法
函数提升和变量提升
Cut out web icons through PS 2021
Basic usage of Monaco Editor
C语言 结构体定义方法
磷脂-聚乙二醇-酰肼,DSPE-PEG-Hydrazide,DSPE-PEG-HZ,MW:5000