Preview:
// Importing specific functions from math.js
import { add, subtract, PI } from './math.js';

console.log(add(2, 3));       // Output: 5
console.log(subtract(5, 3));  // Output: 2
console.log(PI);              // Output: 3.14159
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter