Is it somehow possible to convert a string to an array as easy as possible without any hacks? and without splitting the string at some point?
string
array
For example bringing this:
temp = 'Text';
to this:
temp = ['Text'];
It might be a simple question but I couldn't find any solution without splitting the string.
If you want an array with the string as a single value just create a new array with that string.
temp = [temp];
2.1m questions
2.1m answers
60 comments
57.0k users