bhylu.com

Advertisements

JS Editor

The JavaScript editor runs console programs in an isolated worker. Paste code, inspect it, then explicitly select Run.

Where to run this

This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.

A practical example

JavaScript

const places = [3, 5, 0];
console.log(places.filter(count => count > 0));

What happens

The output contains the two positive counts.