+1 vote
by (8.9k points)
<<set _colour to "red">>

Is there a simple way to make the browser display: RED

2 Answers

+1 vote
by (8.6k points)
selected by
Best answer

Using standard JavaScript methods:

<<- _colour.toUpperCase()>>

Or if you'd rather prefer lodash, which deals with undefined or not-real-string variables nicely:

<<- _.toUpper(_colour)>>


+1 vote
by (63.1k points)

You can use the toUpperCase() method: 

<<print _colour.toUpperCase()>>

Edit: Whoops, didn't see that @Akjosch beat me to it. 

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.