Just wondering how trimming / excluding meta spaces can be done in JavaScript. For example, I am going to load a set of array values from a meta. I have this:
var motion = $dataActors[actor].meta.motion.split(" ,");However, if you placed:
<motion: Attack, Defend, Attack, Defend>it will still carry the " " as a value. So in completion, we have an array that contains: " ", Attack, Defend, Attack, Defend
How can we remove the " " specifically, so it would only have Attack, Defend, Attack, Defend?
var motion = $dataActors[actor].meta.motion.split(" ,");However, if you placed:
<motion: Attack, Defend, Attack, Defend>it will still carry the " " as a value. So in completion, we have an array that contains: " ", Attack, Defend, Attack, Defend
How can we remove the " " specifically, so it would only have Attack, Defend, Attack, Defend?