4 ms·
The JS that drives that is awful. Why are they not using an array? nytg.buttonText="What else is facebook worth more than?,What else is facebook worth more
by bdg 14y ago
The JS that drives that is awful. Why are they not using an array?
nytg.buttonText="What else is facebook worth more than?,What else is facebook worth more than?,What else is facebook worth more than?,Keep going?,One more time?,Another one?,Again?,It might be time to stop,I can generate thousands of these".split(",");
- Animus7 14y agoIf you think this is "awful" JS, you're in for a rude awakening.
- 1234the1234 14y agoWell technically it's an array after that split.
- micaeked 14y agoprobably because it was easier for them to represent it this way in their source/editor
- epaik 14y agoI don't think it's that awful. The cost of the split is minimal, and it allows for easy addition, editing, or removal of strings. Also, this snippet is hardly the JS that "drives" the thing.