Skip to content

Arrow Function Style

Dan Connolly edited this page Jun 8, 2021 · 7 revisions

JavaScript has several syntaxes for functions / methods. For consistency, conciseness, and security (#524), we use arrow function syntax in our preferred dialect, Jessie:

const foo = (a, b) => a + b;
harden(foo);

const bar = async (a, b) => a + b;
harden(bar);
const obj = {
  add: (a, b) => a + b,
};

Finding without function foo

Look for name = or name: .

Clone this wiki locally