Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
const add = (a, b) => a + b; const double = n => n * 2; const obj = () => ({ key: "value" }); // wrap in () to return object const nums = [1, 2, 3].map(n => n * 2); // [2, 4, 6] // Arrow keeps outer "this" this.timer = setInterval(() => this.tick(), 1000);
Result
Open