📜  js 拆分字符串 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:18.933000             🧑  作者: Mango

代码示例6
var myString = "Hello World!";

// splitWords is an array
// [Hello,World!]
var splitWords = myString.split(" ");

// e.g. you can use it as an index or remove a specific word:
var hello = splitWords[splitWords.indexOf("Hello")];