Slide 17
Slide 17 text
Which line may throw an error?
// TypeScript
for (const rawName of requestedNames) {
const name = normalizeUserName(rawName);
const user = findUser(name);
if (user == null) {
missingNames.push(name);
continue;
}
const group = findGroup(user.id);
const summary = buildUserSummary(user, group);
members.push(summary);
activityLog.record(summary.displayName);
}
const pageTitle = formatPageTitle(members.length, missingNames.length);
const groupIds = new Set(members.map((member) => member.groupId));
At a glance, the poten.al sources of errors are unclear.