-
Notifications
You must be signed in to change notification settings - Fork 254
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
This wiki is for developing agoric-sdk. For help using Agoric SDK, see https://docs.agoric.com/ and https://agoric-sdk.pages.dev/