convert given text to an array javascript code example Example: javascript text to array var str = "How are you doing today?"; var res = str.split(" ");