What’s wrong with that code?

Technology CommunityCategory: TypeScriptWhat’s wrong with that code?
VietMX Staff asked 1 year ago
// something is wrong
function reverse(s: String): String;

Don’t ever use the types NumberStringBoolean, or Object. These types refer to non-primitive boxed objects that are almost never used appropriately in JavaScript code. Instead of Object, use the non-primitive object type.


function reverse(s: string): string;