Oris
Today
Universe
Explore
Studio
Authors
Account
6 tadan 1-dars
Order these lines into a correct overloaded function
1
Tap an item below
2
Tap an item below
3
Tap an item below
4
Tap an item below
5
Tap an item below
function reverse(x: string): string;
function reverse(x: unknown[]): unknown[];
function reverse(x: string | unknown[]) {
return typeof x === 'string' ? [...x].reverse().join('') : [...x].reverse();
}
Today
Universe
Explore
Profile