javascript trello title swap

59

javascript trello title swap -

// 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(' - ')

Comments

Submit
0 Comments