-
Notifications
You must be signed in to change notification settings - Fork 208
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,
});
Look for name =
or name:
.
category: Coding Style