let or const by default?
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.
-
Write a JavaScript function that computes the average of an array of numbers. -
Write a JavaScript function that takes a list of users and returns the ones with `active: true`, sorted by name. -
Write a JavaScript function that builds a URL with a base path and a query parameters object.
Who said what
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.
“If you're reaching for `let` on a variable you never reassign, you're not writing JavaScript — you're writing a love letter to mutation bugs you haven't met yet.”
“If you reach for let first, you are advertising that you mutate by default; const is correct because most bindings never reassign, and your code should reflect that reality.”
“If you reach for `let` first, you’re announcing sloppy intent; `const` is the correct default because locals shouldn’t be mutable unless you’ve actually earned the mutation.”
“Defaulting to `let` is a rookie move; `const` prevents reassignment bugs and makes code predictable, a concept I'm sure you'll grasp eventually.”
Show me the actual code (240 samples)
Claude Sonnet 4.6 — 60 samples click to expand
Write a JavaScript function that computes the average of an array of numbers.
## Computing the Average of an Array of Numbers
### Function Implementation
```javascript
/**
* Computes the average of an array of numbers.
* @param {number[]} numbers - The array of numbers.
* @returns {number} The average of the numbers, or 0 if the array is empty.
*/
function computeAverage(numbers) {
if (!Array.isArray(numbers) || numbers.length === 0) {
return 0;
}
const sum = numbers.reduce((accumulator, current) => accumulator + current, 0);
return sum / numbers.length;
}
```
### Usage Examples
```javascript
// Basic usage
console.log(computeAverage([1, 2, 3, 4, 5])); // Output: 3
console.log(computeAverage([10, 20, 30])); // Output: 20
console.log(computeAverage([1.5, 2.5, 3.5])); // Output: 2.5
// Edge cases
console.log(computeAverage
… Write a JavaScript function that computes the average of an array of numbers.
## Computing the Average of an Array of Numbers
### Function Implementation
```javascript
/**
* Computes the average of an array of numbers.
* @param {number[]} numbers - The array of numbers.
* @returns {number} The average of the numbers, or 0 if the array is empty.
*/
function computeAverage(numbers) {
if (!Array.isArray(numbers) || numbers.length === 0) {
return 0;
}
const sum = numbers.reduce((accumulator, current) => accumulator + current, 0);
return sum / numbers.length;
}
```
### Usage Examples
```javascript
// Basic usage
console.log(computeAverage([1, 2, 3, 4, 5])); // Output: 3
console.log(computeAverage([10, 20, 30])); // Output: 20
console.log(computeAverage([1.5, 2.5, 3.5])); // Output: 2.5
// Edge cases
console.log(computeAverage
… Write a JavaScript function that computes the average of an array of numbers.
## Computing the Average of an Array of Numbers
### Function Implementation
```javascript
/**
* Computes the average of an array of numbers.
* @param {number[]} numbers - The array of numbers.
* @returns {number} The average of the numbers, or 0 if the array is empty.
*/
function computeAverage(numbers) {
if (!Array.isArray(numbers) || numbers.length === 0) {
return 0;
}
const sum = numbers.reduce((accumulator, current) => accumulator + current, 0);
return sum / numbers.length;
}
```
### Usage Examples
```javascript
// Basic usage
console.log(computeAverage([1, 2, 3, 4, 5])); // Output: 3
console.log(computeAverage([10, 20, 30])); // Output: 20
console.log(computeAverage([1.5, 2.5, 3.5])); // Output: 2.5
// Edge cases
console.log(computeAverage
… …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
Write a JavaScript function that computes the average of an array of numbers.
```javascript
function average(numbers) {
if (!Array.isArray(numbers) || numbers.length === 0) {
return 0;
}
const sum = numbers.reduce((total, num) => total + num, 0);
return sum / numbers.length;
}
```
Example:
```javascript
console.log(average([1, 2, 3, 4, 5])); // 3
``` Write a JavaScript function that computes the average of an array of numbers.
```javascript
function average(numbers) {
if (!Array.isArray(numbers) || numbers.length === 0) {
return 0; // or throw an error if preferred
}
const sum = numbers.reduce((total, num) => total + num, 0);
return sum / numbers.length;
}
```
Example:
```javascript
console.log(average([10, 20, 30])); // 20
``` Write a JavaScript function that computes the average of an array of numbers.
```javascript
function average(numbers) {
if (!Array.isArray(numbers) || numbers.length === 0) {
return 0; // or throw an error if preferred
}
const sum = numbers.reduce((total, num) => total + num, 0);
return sum / numbers.length;
}
```
Example:
```javascript
console.log(average([10, 20, 30])); // 20
``` …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
Write a JavaScript function that computes the average of an array of numbers.
```javascript
function average(numbers) {
if (numbers.length === 0) return 0; // or throw an error if preferred
const sum = numbers.reduce((total, num) => total + num, 0);
return sum / numbers.length;
}
```
Example:
```javascript
console.log(average([1, 2, 3, 4])); // 2.5
``` Write a JavaScript function that computes the average of an array of numbers.
```javascript
function average(numbers) {
if (numbers.length === 0) return 0;
const sum = numbers.reduce((total, num) => total + num, 0);
return sum / numbers.length;
}
```
Example:
```javascript
console.log(average([1, 2, 3, 4])); // 2.5
console.log(average([])); // 0
``` Write a JavaScript function that computes the average of an array of numbers.
```javascript
function average(numbers) {
if (numbers.length === 0) return 0;
const sum = numbers.reduce((total, num) => total + num, 0);
return sum / numbers.length;
}
```
Example:
```javascript
console.log(average([1, 2, 3, 4])); // 2.5
console.log(average([])); // 0
```
…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
Write a JavaScript function that computes the average of an array of numbers.
Of course! Here are a few ways to write a JavaScript function to compute the average of an array of numbers, from the most modern and concise to the more traditional.
### 1. The Modern Approach (Using `Array.prototype.reduce`)
This is the most common and idiomatic way to do it in modern JavaScript. It's concise and expressive.
```javascript
/**
* Computes the average of an array of numbers.
*
* @param {number[]} numbers - The array of numbers.
* @returns {number} The average of the numbers, or 0 if the array is empty.
*/
function calculateAverage(numbers) {
// 1. Handle the edge case of an empty array to avoid division by zero.
if (numbers.length === 0) {
return 0;
}
// 2. Use the reduce method to sum all numbers in the array.
// The '0' is the initial value for the
… Write a JavaScript function that computes the average of an array of numbers.
Of course! Here are a few ways to write a JavaScript function to compute the average of an array of numbers, from the most modern and concise to the more traditional.
### 1. The Modern Approach (Using `Array.prototype.reduce`)
This is the most common and idiomatic way to do it in modern JavaScript. It's concise and expressive.
```javascript
/**
* Computes the average of an array of numbers.
*
* @param {number[]} numbers - The array of numbers.
* @returns {number} The average of the numbers, or 0 if the array is empty.
*/
function calculateAverage(numbers) {
// 1. Handle the edge case of an empty array to avoid division by zero.
if (numbers.length === 0) {
return 0;
}
// 2. Use the reduce method to sum all numbers in the array.
// The '0' is the initial value for the
… Write a JavaScript function that computes the average of an array of numbers.
Of course! Here are a few ways to write a JavaScript function to compute the average of an array of numbers, from the most common and readable to a more concise version.
### 1. The Modern Approach (Using `Array.prototype.reduce`)
This is the most common and idiomatic way to do it in modern JavaScript. It's clean, readable, and functional.
```javascript
/**
* Computes the average of an array of numbers.
*
* @param {number[]} numbers - The array of numbers.
* @returns {number} The average of the numbers, or 0 if the array is empty.
*/
function calculateAverage(numbers) {
// 1. Handle the edge case of an empty array to avoid division by zero.
if (!Array.isArray(numbers) || numbers.length === 0) {
return 0;
}
// 2. Use the reduce method to sum all the numbers in the array.
… …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 $2.72.
Each output got fed through a fight-specific regex classifier.
For let-vs-const-default 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.
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 →