📅  最后修改于: 2022-03-11 15:02:25.495000             🧑  作者: Mango
// switch title from bo to cp
var title = 'title1 - title2';
var arr = title.split(' - ');
var b = arr[4];
arr[4] = arr[5];
arr[5] = b
arr.splice(3, 1)
var c = arr.length - 5
arr.splice(5, c)
arr.join(' - ')