Find the unchecked assumption in this generated label helper.
TypeScript
function firstLabel(labels: string[]): string {
return labels[0].toUpperCase();
}
console.log(firstLabel([]));
function firstLabel(labels: string[]): string {
return labels[0].toUpperCase();
}
console.log(firstLabel([]));