JavaScript · 205 KB
Large JavaScript file (about 10,000 lines)
1,428 generated functions in about 10,000 lines of valid JavaScript, for testing editors, syntax highlighters, linters and diff tools with big files.
CC0 · free for any use · Verified by an independent tool · Report a problem
// Generated 10,000-line JavaScript file — samplefiles.com
export function compute0(values) {
// Scaled sum for batch 0
let total = 0;
for (const v of values) total += v * 0;
return total;
}
export function compute1(values) {
// Scaled sum for batch 1
let total = 0;
for (const v of values) total += v * 1;
return total;
}
export function compute2(values) {
// Scaled sum for batch 2
let total = 0;
for (const v of values) total += v * 2;
return total;
}
export function compute3(values) {
// Scaled sum for batch 3File details
Download from the command line
curl -L -o sample-10000-lines.js https://files.samplefiles.com/code/js/sample-10000-lines.jswget https://files.samplefiles.com/code/js/sample-10000-lines.jshttps://files.samplefiles.com/code/js/sample-10000-lines.jsprintf '%s %s\n' f4ddbcbb8ea61a51a404b3940b025a9ec832a001c6e3feb469c8e133b1f4de2f sample-10000-lines.js | shasum -a 256 -cOr check the download in your browser with the checksum calculator.
Same sample in other formats
Python · 213 KBJava · 264 KBC · 268 KBGo · 167 KBRust · 250 KB
Similar JavaScript files
| File | Size | Details | Download |
|---|---|---|---|
| Minified JavaScript (with source map)sample.min.js | 443 B | Download | |
| Sample JavaScript filesample.js | 642 B | Download |