FerrLens

Tools · Dev utilities

Diff tool

Compare two blobs of text side-by-side or as a unified diff. Whitespace and case toggles.

+43=3
Original
Modified
1
function greet(name) {
1
+
function greet(name, lang = "en") {
2
return "Hello, " + name + "!";
2
+
const prefix = lang === "fr" ? "Bonjour" : "Hello";
3
+
return `${prefix}, ${name}!`;
3
}
4
}
4
 
5
 
5
const user = "Bryan";
6
const user = "Bryan";
6
console.log(greet(user));
7
+
console.log(greet(user, "fr"));
The link encodes your inputs in the URL fragment. Nothing is uploaded.