Created
July 21, 2026 08:24
-
-
Save hctilg/bc0a0d0b81c325eb5b655f0b71c727dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tring.prototype.title = function() { | |
| if (!this) return this; | |
| return this | |
| .split(" ") | |
| .map(word => (word ? word[0].toUpperCase() + word.slice(1) : word)) | |
| .join(" "); | |
| } | |
| console.log("title".title(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment