+ 1
How to get values?: «'/command [value] [value]'»
i have a variable: «var msg = '/command value1 value2'», how can I make «value1» and «value2» output to alert()? For example: alert(/command +' ' value1+' ' value2)
1 Answer
+ 2
Hi, thanks for the reply! But, the answer is different. I wanted something completely different, to get arguments from a string. For example, I had a variable with the string: '/ text value1 value2' and I needed to extract this data separately, for example: alert (`text: $ {text} \ nValue1: $ {value1} \ nValue2: $ {value2}` ) - but I have already solved this problem, if you wonder how, I implemented it - write!