Skip to content

Arrow Function Style

Mark S. Miller edited this page Jun 9, 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);

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

Finding without function foo

Look for name = or name: .


category: Coding Style

Clone this wiki locally