Back to Dev Tools
100% Client-side & Private Sandbox

Diff & Text Compare

Data & Formatting

Compare two code snippets, configurations, or JSON files line-by-line with visual change highlighting.

Original Text (Left)
Plain Text / Monospace7 lines · 159 chars
Modified Text (Right)
Plain Text / Monospace6 lines · 215 chars
Diff Output
+4 added-5 removed2 unchanged
11 function calculateSprintVelocity(stories) {
2- let total = 0;
3- for (let i = 0; i < stories.length; i++) {
4- total += stories[i].points;
5- }
6- return total;
2+ // Use array reduce for cleaner calculation
3+ return stories
4+ .filter((story) => story.status === "DONE")
5+ .reduce((sum, story) => sum + (story.points || 0), 0);
76 }