Skip to content

Commit

Permalink
Merge pull request #132 from reznikovAndrey/fix/solution
Browse files Browse the repository at this point in the history
fix: remove `.at()` method
  • Loading branch information
bondiano committed Jan 16, 2023
2 parents a7f9026 + f37d36b commit e3b6944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/20-functions/90-type-narrowing/index.ts
Expand Up @@ -4,7 +4,7 @@ function last(value: string | number): string | number {
return value % 10;
}

return value.at(-1) ?? '';
return value[value.length - 1] ?? '';
}
// END

Expand Down

0 comments on commit e3b6944

Please sign in to comment.