我想
5
并制作
var string1 = '7~~7.5~~8~~8.5~~9~~9.5~~10~~10.5~~11~~11.5~~12~~13~~14';
var string2 = 'Boot~~Casual~~Dual Comfort~~Plain Toe'
我尝试过映射它。我也试过使用拆分。我希望能够以编程方式对字符串1或字符串2中遵循模式的任何类型的字符串执行此操作。
答案 0 :(得分:2)
使用split()
方法将其转换为数组
var string1 = '7~~7.5~~8~~8.5~~9~~9.5~~10~~10.5~~11~~11.5~~12~~13~~14';
string1 = string1.split('~~');
console.log(string1);