File compare

Ignore:

Runs on your device. Nothing you type or open is sent anywhere.

22 lines
22 lines

Comparison

1 added1 removed4 changed

1Removed: // Sends a short greeting to everyone on the team.
1Added: // Sends a short, friendly greeting to everyone on the team.
2Removed: const team = ['Ada', 'Grace', 'Linus'];
2Added: const team = ['Ada', 'Grace', 'Margaret'];
33
3
4Removed: function greet(name) {
4Added: function greet(name, greeting = 'Hello') {
5Removed: return 'Hello, ' + name + '.';
5Added: return `${greeting}, ${name}!`;
66}
6}
77
7
88function welcomeAll(names) {
8function welcomeAll(names) {
1717 return names.length;
17 return names.length;
1818}
18}
1919
19
20Removed: // TODO: sort the names first
2120console.log(welcomeAll(team).join('\n'));
20console.log(welcomeAll(team).join('\n'));
2221console.log('People greeted:', count(team));
21console.log('People greeted:', count(team));
22Added: console.log('Done.');