Created
June 22, 2021 02:52
-
-
Save dimasandhk/0def8f14e5713a13c6d734ae0ab6c5f6 to your computer and use it in GitHub Desktop.
This file contains 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
String.prototype.capitalize = function() { | |
return `${this[0].toUpperCase()}${this.slice(1)}` | |
} | |
console.log('ini teks'.capitalize()) // => 'Ini teks' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment