why so much use of .split() in jQ instead of just an array?
was just browsing the source and noticed that there are a lot of places where there is a space-separated list of stuff in a string (sometimes multiple stings concatenated) followed by a .split().
in the places i saw it used, it's done just on init, so speed really isnt a factor. but why not just have an array?
why this:
- props: "altKey attrChange attrName bubbles button".split(" ");
rather than this?:
- props: ['altKey','attrChange','attrName','bubbles','button'];
the only benefit i see is character count in the source and one string rather than numerous. on the other hand if optimized by a compiler identical strings can be merged into a single reference.
just curious...