Define a mathematical expression in Javascript