Thursday, June 4, 2009

Console: A simple Calculator

Upcoming v3.6 includes a new JavaScript Expression evaluator.

How To

  1. Open the Console (Ctrl+Shift+K, Tools -> Console)
  2. Type the following command (equal sign first): =<JavaScript Expression>

Example 1 - basic expression


Example 2 - variables

=foo=15; 1337*(42+foo)

foo is a user defined variable (type =foo to display its value).

See all JavaScript Operators.