New! The Potato Stock Exchange is open. Get in early! New! Try the new dashboard!

#js

Run Javascript

Evaluate JavaScript code and return the result. Context is isolated for security reasons, however there are some predefined functions available. If there is no output from the execution, it will return 👍 to indicate the evaluation has completed.

Usage

#js <code>

<angle brackets> are required [square brackets] are optional flags change what it does

Arguments

  • code Optional Text, the rest of the message

    The JavaScript code to evaluate (not needed when using the gist flag)

Flags 1

  • gist: Text

    Import a gist or haste code snippet to evaluate.

    #js gist:https://some-text.url.com

Examples 5

Multiply two numbers

ManifestingBagel:#js 48 * 9
PotatBotat:432

Convert text to uppercase

UninstallingFridge71:#js 'potato'.toUpperCase()
PotatBotat:POTATO