i++, ++i, or i += 1?
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 counts the number of vowels in a string using a for loop. -
Write a JavaScript function `sumOfSquares(n)` that returns the sum of squares from 1 to n using a counter loop. -
Write a JavaScript function that returns the index of the first negative number in an array using an indexed loop.
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 writing `++i` in a simple loop counter, you've absorbed a 1990s C++ micro-optimization myth and are now inflicting your cargo-cult performance anxiety on everyone who reads your code.”
“If you write prefix increment in a plain loop counter, congratulations on adding semantic noise for zero benefit—postfix is the standard, and your `++i` cosplay fools nobody.”
“Anyone championing prefix ++ in a counting loop is performing ceremony for compile-time trivia, while postfix count++ is the clean, idiomatic choice that actually reads like incrementing a counter.”
“Reaching for prefix `++i` sacrifices universal readability for a nonexistent performance gain, loudly broadcasting that you fell for a C++ myth from the nineties.”
Show me the actual code (240 samples)
Claude Sonnet 4.6 — 60 samples click to expand
Write a JavaScript function that counts the number of vowels in a string using a for loop.
## Counting Vowels in a String
### Function Implementation
```javascript
function countVowels(str) {
const vowels = "aeiouAEIOU";
let count = 0;
for (let i = 0; i < str.length; i++) {
if (vowels.includes(str[i])) {
count++;
}
}
return count;
}
```
### Example Usage
```javascript
// Test cases
console.log(countVowels("Hello, World!")); // Output: 3
console.log(countVowels("JavaScript")); // Output: 3
console.log(countVowels("aeiou")); // Output: 5
console.log(countVowels("AEIOU")); // Output: 5
console.log(countVowels("rhythm")); // Output: 0
console.log(countVowels("")); // Output: 0
```
### How It Works
| Step | Description |
|------|-------------|
| 1 | Define a string containing all vowels (both lowercase and u
… Write a JavaScript function that counts the number of vowels in a string using a for loop.
## Counting Vowels in a String
### Function Implementation
```javascript
function countVowels(str) {
const vowels = "aeiouAEIOU";
let count = 0;
for (let i = 0; i < str.length; i++) {
if (vowels.includes(str[i])) {
count++;
}
}
return count;
}
```
### Example Usage
```javascript
// Test cases
console.log(countVowels("Hello, World!")); // Output: 3
console.log(countVowels("JavaScript")); // Output: 3
console.log(countVowels("aeiou")); // Output: 5
console.log(countVowels("AEIOU")); // Output: 5
console.log(countVowels("rhythm")); // Output: 0
console.log(countVowels("")); // Output: 0
```
### How It Works
| Step | Description |
|------|-------------|
| 1 | Define a string containing all vowels (both lowercase and u
… Write a JavaScript function that counts the number of vowels in a string using a for loop.
## Counting Vowels in a String
### Function Implementation
```javascript
function countVowels(str) {
const vowels = "aeiouAEIOU";
let count = 0;
for (let i = 0; i < str.length; i++) {
if (vowels.includes(str[i])) {
count++;
}
}
return count;
}
```
### Example Usage
```javascript
// Test cases
console.log(countVowels("Hello, World!")); // Output: 3
console.log(countVowels("JavaScript")); // Output: 3
console.log(countVowels("aeiou")); // Output: 5
console.log(countVowels("rhythm")); // Output: 0
console.log(countVowels("")); // Output: 0
console.log(countVowels("HELLO")); // Output: 2
```
### How It Works
| Step | Description |
|------|-------------|
| 1 | Define a string containing all vowels (both lowercase and u
… …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 counts the number of vowels in a string using a for loop.
```javascript
function countVowels(str) {
let count = 0;
const vowels = "aeiouAEIOU";
for (let i = 0; i < str.length; i++) {
if (vowels.includes(str[i])) {
count++;
}
}
return count;
}
// Example
console.log(countVowels("Hello World")); // 3
```
This function loops through each character in the string and increases the count whenever it finds a vowel. Write a JavaScript function that counts the number of vowels in a string using a for loop.
```javascript
function countVowels(str) {
let count = 0;
const vowels = "aeiouAEIOU";
for (let i = 0; i < str.length; i++) {
if (vowels.includes(str[i])) {
count++;
}
}
return count;
}
// Example:
console.log(countVowels("Hello World")); // 3
```
This function loops through each character in the string and increases the count whenever it finds a vowel. Write a JavaScript function that counts the number of vowels in a string using a for loop.
```javascript
function countVowels(str) {
let count = 0;
const vowels = "aeiouAEIOU";
for (let i = 0; i < str.length; i++) {
if (vowels.includes(str[i])) {
count++;
}
}
return count;
}
// Example usage:
console.log(countVowels("Hello World")); // 3
```
This function loops through each character in the string and increases the count whenever it finds a vowel. …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 counts the number of vowels in a string using a for loop.
```javascript
function countVowels(str) {
let count = 0;
const vowels = "aeiouAEIOU";
for (let i = 0; i < str.length; i++) {
if (vowels.includes(str[i])) {
count++;
}
}
return count;
}
// Example:
console.log(countVowels("Hello World")); // 3
```
This function loops through each character in the string and increases the count when it finds a vowel. Write a JavaScript function that counts the number of vowels in a string using a for loop.
```javascript
function countVowels(str) {
let count = 0;
const vowels = "aeiouAEIOU";
for (let i = 0; i < str.length; i++) {
if (vowels.includes(str[i])) {
count++;
}
}
return count;
}
// Example:
console.log(countVowels("Hello World")); // 3
```
This function loops through each character in the string and increments `count` whenever it finds a vowel. Write a JavaScript function that counts the number of vowels in a string using a for loop.
```javascript
function countVowels(str) {
let count = 0;
const vowels = "aeiouAEIOU";
for (let i = 0; i < str.length; i++) {
if (vowels.includes(str[i])) {
count++;
}
}
return count;
}
// Example:
console.log(countVowels("Hello World")); // 3
```
This function loops through each character in the string and increases the count whenever it finds a vowel. …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 counts the number of vowels in a string using a for loop.
Of course! Here is a JavaScript function that counts vowels in a string using a standard `for` loop, along with a detailed explanation.
### The JavaScript Function
This version is clean, readable, and handles both uppercase and lowercase vowels.
```javascript
/**
* Counts the number of vowels in a given string.
* Vowels are considered 'a', 'e', 'i', 'o', 'u', case-insensitive.
*
* @param {string} str The input string to check.
* @returns {number} The total number of vowels found.
*/
function countVowels(str) {
// 1. Initialize a counter to store the number of vowels.
let vowelCount = 0;
// 2. Create a string of vowels for easy checking.
const vowels = "aeiou";
// 3. Ensure the input is a string to avoid errors.
if (typeof str !== 'string') {
return 0;
}
// 4
… Write a JavaScript function that counts the number of vowels in a string using a for loop.
Of course! Here is a JavaScript function that counts vowels in a string using a standard `for` loop, along with a detailed explanation.
### The JavaScript Function
```javascript
/**
* Counts the number of vowels in a given string using a for loop.
* The function is case-insensitive (counts both 'a' and 'A').
*
* @param {string} str The string to analyze.
* @returns {number} The total number of vowels found.
*/
function countVowels(str) {
// 1. Initialize a counter to zero.
let vowelCount = 0;
// 2. Define the vowels we want to check for.
const vowels = 'aeiou';
// 3. Convert the input string to lowercase to make the check case-insensitive.
const lowerCaseStr = str.toLowerCase();
// 4. Loop through each character of the string.
for (let i = 0; i < lowerCaseStr.len
… Write a JavaScript function that counts the number of vowels in a string using a for loop.
Of course! Here is a JavaScript function that counts vowels in a string using a standard `for` loop, along with a detailed explanation.
### The Function
```javascript
/**
* Counts the number of vowels in a given string using a for loop.
* Vowels are considered 'a', 'e', 'i', 'o', 'u', case-insensitive.
*
* @param {string} str The string to check.
* @returns {number} The total number of vowels found.
*/
function countVowels(str) {
// 1. Initialize a counter to store the number of vowels.
let vowelCount = 0;
// 2. Create a string of vowels for easy checking.
const vowels = 'aeiou';
// 3. Convert the input string to lowercase to make the check case-insensitive.
const lowerCaseStr = str.toLowerCase();
// 4. Loop through each character of the string.
for (let i = 0; i
… …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.20.
Each output got fed through a fight-specific regex classifier.
For increment-style 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 →