I have a script, which returns value as an object. It can return text or numbers, like 'hello, goodbye' or '500, 900'.
When I try to use split() with this object, I catch an error:
TypeError: Object 'hello, goodbye' has no method 'split'
But I want to use split. What开发者_开发技巧 can I do?
Seems the only way to convert this object into a string, how to do that?
does a = a+''; a.split('') work? that should convert the object to string before split is called.
加载中,请稍侯......
精彩评论