★ Petty Evals
formatting

Tabs vs spaces (JavaScript)?

SPACES
4 spaces

Unanimous. Anyone disagreeing with this in 2026 needs to log off.

The exact prompts I used (3 variants)

Each model got each prompt 20 times (2 temperatures × 10 runs). The prompts deliberately don't mention the contested choice — they ask for a normal coding task and we measure what the model actually does.

  1. Write a JavaScript function that flattens a nested array to a single level.
  2. Write a JavaScript function that debounces another function with a given delay in milliseconds.
  3. Write a JavaScript function that parses a query string into an object.

Who said what

Claude Sonnet 4.6
claude-sonnet-4-6
SPACES
100% confidence (95% CI: 94–100%)
GPT-5.4
gpt-5.4
SPACES
100% confidence (95% CI: 94–100%)
GPT-5.4 mini
gpt-5.4-mini
SPACES
100% confidence (95% CI: 94–100%)
Gemini 2.5 Pro
gemini-2.5-pro
SPACES
100% confidence (95% CI: 94–100%)

The pundit panel.

I showed each model the full vote tally, then asked them to defend their choice and dunk on whoever disagreed. Receipts attached.

Claude Sonnet 4.6
voted SPACES

“Tab indentation in JavaScript isn't a preference, it's a cry for help — spaces render consistently across every editor, every terminal, and every code review, while tabs are just chaos with a keyboard shortcut.”

GPT-5.4
voted SPACES

“If you indent JavaScript with tabs, you’re choosing editor roulette over readable, consistent diffs and proving your whitespace opinions are stronger than your engineering judgment.”

GPT-5.4 mini
voted SPACES

“Tabs advocates are just exporting their editor settings as ideology; spaces win because JavaScript formatting stays consistent, readable, and unambiguous across every toolchain.”

Gemini 2.5 Pro
voted SPACES

“Using tabs is just choosing configurable rendering chaos over the universal consistency spaces provide, which is a bizarre and selfish hill to die on.”

Show me the actual code (240 samples)
Claude Sonnet 4.6 — 60 samples click to expand
variant 0 · temp 0 · run 0 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
## Flatten Nested Array Function

Here are several approaches to flatten a nested array in JavaScript:

### 1. Recursive Approach
```javascript
function flattenArray(arr) {
  return arr.reduce((flat, item) => {
    return Array.isArray(item)
      ? flat.concat(flattenArray(item))
      : flat.concat(item);
  }, []);
}
```

### 2. Using a Stack (Iterative Approach)
```javascript
function flattenArray(arr) {
  const stack = [...arr];
  const result = [];

  while (stack.length) {
    const item = stack.pop();

    if (Array.isArray(item)) {
      stack.push(...item);
    } else {
      result.unshift(item);
    }
  }

  return result;
}
```

### 3. With Depth Control
```javascript
function flattenArray(arr, depth = Infinity) {
  if (depth === 0) return arr.slice();

  return arr.reduce((fla
…
variant 0 · temp 0 · run 1 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
## Flatten Nested Array Function

Here are several approaches to flatten a nested array in JavaScript:

### 1. Recursive Approach
```javascript
function flattenArray(arr) {
  return arr.reduce((flat, item) => {
    return Array.isArray(item)
      ? flat.concat(flattenArray(item))
      : flat.concat(item);
  }, []);
}
```

### 2. Using a Stack (Iterative Approach)
```javascript
function flattenArray(arr) {
  const stack = [...arr];
  const result = [];

  while (stack.length) {
    const item = stack.pop();

    if (Array.isArray(item)) {
      stack.push(...item);
    } else {
      result.unshift(item);
    }
  }

  return result;
}
```

### 3. With Depth Control
```javascript
function flattenArray(arr, depth = Infinity) {
  if (depth === 0) return arr.slice();

  return arr.reduce((fla
…
variant 0 · temp 0 · run 2 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
## Flatten Nested Array Function

Here are several approaches to flatten a nested array in JavaScript:

### 1. Recursive Approach
```javascript
function flattenArray(arr) {
  return arr.reduce((flat, item) => {
    return Array.isArray(item)
      ? flat.concat(flattenArray(item))
      : flat.concat(item);
  }, []);
}
```

### 2. Using a Stack (Iterative Approach)
```javascript
function flattenArray(arr) {
  const stack = [...arr];
  const result = [];

  while (stack.length) {
    const item = stack.pop();

    if (Array.isArray(item)) {
      stack.push(...item);
    } else {
      result.unshift(item);
    }
  }

  return result;
}
```

### 3. With Optional Depth Control
```javascript
function flattenArray(arr, depth = Infinity) {
  if (depth === 0) return arr.slice();

  return arr.re
…

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

GPT-5.4 — 60 samples click to expand
variant 0 · temp 0 · run 0 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
```javascript
function flattenArray(arr) {
  return arr.reduce((flat, item) => {
    return flat.concat(Array.isArray(item) ? flattenArray(item) : item);
  }, []);
}
```

Example:

```javascript
const nested = [1, [2, [3, 4], 5], 6];
console.log(flattenArray(nested)); // [1, 2, 3, 4, 5, 6]
```

If you want, I can also provide an iterative version or one using `flat()`.
variant 0 · temp 0 · run 1 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
```javascript
function flattenArray(arr) {
  return arr.reduce((flat, item) => {
    return flat.concat(Array.isArray(item) ? flattenArray(item) : item);
  }, []);
}
```

Example:

```javascript
const nested = [1, [2, [3, 4], 5], 6];
console.log(flattenArray(nested)); // [1, 2, 3, 4, 5, 6]
```

If you want, I can also provide:
- an iterative version
- a version using `flat(Infinity)`
- a version that avoids recursion for very deep arrays
variant 0 · temp 0 · run 2 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
```javascript
function flattenArray(arr) {
  return arr.reduce((flat, item) => {
    return flat.concat(Array.isArray(item) ? flattenArray(item) : item);
  }, []);
}
```

Example:

```javascript
const nested = [1, [2, [3, 4], 5], 6];
console.log(flattenArray(nested)); // [1, 2, 3, 4, 5, 6]
```

If you want, I can also provide:
- an iterative version
- a version using `flat()`
- a depth-limited flatten function

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

GPT-5.4 mini — 60 samples click to expand
variant 0 · temp 0 · run 0 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
Sure — here’s a simple JavaScript function that flattens a nested array into a single-level array:

```javascript
function flattenArray(arr) {
  return arr.reduce((flat, item) => {
    return flat.concat(Array.isArray(item) ? flattenArray(item) : item);
  }, []);
}

// Example
const nested = [1, [2, [3, 4], 5], 6];
const result = flattenArray(nested);

console.log(result); // [1, 2, 3, 4, 5, 6]
```

If you want a built-in option in modern JavaScript, you can also use:

```javascript
const flattened = nested.flat(Infinity);
```

If you'd like, I can also show:
- an iterative version
- a version that avoids recursion
- a TypeScript version
variant 0 · temp 0 · run 1 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
```javascript
function flattenArray(arr) {
  return arr.reduce((flat, item) => {
    return flat.concat(Array.isArray(item) ? flattenArray(item) : item);
  }, []);
}

// Example:
const nested = [1, [2, [3, 4], 5], 6];
console.log(flattenArray(nested)); // [1, 2, 3, 4, 5, 6]
```

If you want, I can also show:
- an iterative version,
- a version using `Array.prototype.flat()`,
- or a version that supports a custom depth.
variant 0 · temp 0 · run 2 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
Here’s a simple JavaScript function to flatten a nested array into a single-level array:

```javascript
function flattenArray(arr) {
  return arr.reduce((flat, item) => {
    return flat.concat(Array.isArray(item) ? flattenArray(item) : item);
  }, []);
}

// Example:
const nested = [1, [2, [3, 4], 5], 6];
const flat = flattenArray(nested);

console.log(flat); // [1, 2, 3, 4, 5, 6]
```

If you want, I can also show:
- an iterative version,
- a version using `Array.prototype.flat()`,
- or one that preserves sparse arrays.

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

Gemini 2.5 Pro — 60 samples click to expand
variant 0 · temp 0 · run 0 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
Of course! Here are several ways to write a JavaScript function that flattens a nested array, ranging from the modern built-in method to classic "from-scratch" implementations.

### Method 1: The Modern Built-in `Array.prototype.flat()` (Easiest & Recommended)

Since ES2019, JavaScript has a built-in method that does this for you. This is the best approach for most situations.

The `.flat()` method takes an optional `depth` argument, which specifies how deep a nested array structure should be flattened. To flatten it completely, you can use `Infinity`.

```javascript
/**
 * Flattens a nested array to a single level using the built-in .flat() method.
 * @param {Array} arr The nested array to flatten.
 * @returns {Array} The flattened array.
 */
function flattenWithBuiltIn(arr) {
  // Use In
…
variant 0 · temp 0 · run 1 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
Of course! Here are several ways to write a JavaScript function that flattens a nested array, ranging from the modern built-in method to classic "from-scratch" implementations.

### Method 1: The Modern Built-in `Array.prototype.flat()` (Easiest & Recommended)

Since ES2019, JavaScript has a built-in method that does this for you. This is the best approach for most situations.

The `.flat()` method takes an optional `depth` argument, which specifies how deep a nested array structure should be flattened. To flatten it completely, you can use `Infinity`.

```javascript
/**
 * Flattens a nested array to a single level using the built-in .flat() method.
 * @param {Array} arr The nested array to flatten.
 * @returns {Array} The flattened array.
 */
function flattenWithBuiltIn(arr) {
  // Use In
…
variant 0 · temp 0 · run 2 · → spaces
Prompt

Write a JavaScript function that flattens a nested array to a single level.

Response (first 800 chars)
Of course! Here are several ways to write a JavaScript function that flattens a nested array, ranging from the modern built-in method to classic "from-scratch" implementations.

### Method 1: The Modern Built-in `Array.prototype.flat()` (Easiest & Recommended)

Since ES2019, JavaScript has a built-in method that does this for you. This is the best approach for most situations.

The `.flat()` method takes an optional `depth` argument, which specifies how deep a nested array structure should be flattened. To flatten it completely, you can use `Infinity`.

```javascript
/**
 * Flattens a nested array to a single level using the built-in .flat() method.
 * @param {Array} arr The nested array to flatten.
 * @returns {Array} The flattened array.
 */
function flattenWithBuiltIn(arr) {
  // Use In
…

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

How I did this (the actual nerd shit)

For each of 4 models I ran 3 prompt variants at two temperatures (0.0 and 0.7), 10 runs each — 240 code samples total, cost $3.43.

Each output got fed through a fight-specific regex classifier. For tabs-vs-spaces-js the classifier looks for the specific signal in the output (see the source — there's one function per fight, ~30 lines each). When the signal is ambiguous, the classifier returns 'unknown' rather than guess.

Each model's vote = its modal classification across 60 runs. Confidence = Wilson 95% CI. Verdict = majority across models (ties reported as ties). Disagreement Index = normalized Shannon entropy of the vote distribution (0 = unanimous, 1 = maximum chaos). Leaderboard sorts by this.

The pundit quotes come from a follow-up call after the votes are in — each model gets the full tally and a per-model judgy prompt. I never edit the quotes.

Full walkthrough: the methodology page. Source: GitHub.

Got a pettier debate?

Open a PR with a new fight. I'll run it across all four models, write up the verdict, and add your name to the byline.

Submit via PR →