Skip to content

Arrow function

JavaScript name = arrow → separate diagram

Same task in: TypeScript

Flowchart (ISO 5807)

YesNoStartInput nn mod 2 = 0Return «парне»EndReturn «непарне»EndFigure 1 — classify

Source code

JavaScript
const classify = n => n % 2 === 0 ? "парне" : "непарне";

The editor opens with this code — change it and the chart redraws.

Language
JavaScript
Constructs
name = arrow → separate diagram
Topic
Lambdas
Formats
Word, Visio, draw.io, PDF, SVG

Related examples