I want to have an object that accepts some input string with delimeters like "dog:cat:whale" and want the property inside "splittedText" to be an array of post-split input objects "spittedText[0] = dog, spittedText[1] = cat, spittedText[2] = whale".
The following is generic pseudocode of what I want to accomplish, but doesnt work...
function someObject(input) {
this.splittedText=input.split(':');
}
To test, I should be able to do this:
theObject = new someObject("dog:cat:whale");
alert(someObject(theObject.splittedText[0])); // should print out dog
What am I doing wrong? How do I accomplish this?