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
Download 3 files (207 KB)Shell
# 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
FileSizeDetailsDownload
Minified JavaScript (with source map)sample.min.js443 BDownload
Sample JavaScript filesample.js642 BDownload
Large JavaScript file (about 10,000 lines)sample-10000-lines.js205 KB9,998 linesDownload