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

sample-10000-lines.js — first linesJavaScript
// 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 3

File details

Size
205 KB (210,932 bytes)
MIME type
text/javascript
Lines
9,998
SHA-256
f4ddbcbb8ea61a51a404b3940b025a9ec832a001c6e3feb469c8e133b1f4de2f
MD5
1675dc95b4eea2a1b473d89b62342a68

Download from the command line

curl -L -o sample-10000-lines.js https://files.samplefiles.com/code/js/sample-10000-lines.js

Or 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

FileSizeDetailsDownload
Minified JavaScript (with source map)sample.min.js443 BDownload
Sample JavaScript filesample.js642 BDownload