Code · 3 files
Sample JavaScript Files
JavaScript (ES modules) is the language of the web, also used on servers with Node.js, Deno and Bun. The JavaScript sample is a small program — a customer record, a VIP check and a formatted total — that is the same in every language we offer, so you can compare them side by side.
All 3 javascript files
Download all with curl
# 3 files, 207 KB in total
while read -r url; do curl -LO --fail "$url"; done <<'EOF'
https://files.samplefiles.com/code/js/sample.min.js
https://files.samplefiles.com/code/js/sample.js
https://files.samplefiles.com/code/js/sample-10000-lines.js
EOF| File | Size | Details | Download |
|---|---|---|---|
| Minified JavaScript (with source map)sample.min.js | 443 B | Download | |
| Sample JavaScript filesample.js | 642 B | Download | |
| Large JavaScript file (about 10,000 lines)sample-10000-lines.js | 205 KB | 9,998 lines | Download |