Front-end example (JavaScript)