Text Diff
Original
Modified
Diff Result
Changes: -0+0unchanged: 0
1
--function calculateSum(a, b) {
1
++function calculateSum(a, b, c = 0) {
2
-- // Add two numbers
2
++ // Add two or three numbers
3
-- return a + b;
3
++ return a + b + c;
4
4
}
5
5
6
--// Log the result
6
++// Log the result with different values
7
7
console.log(calculateSum(5, 10));
8
++console.log(calculateSum(5, 10, 15));