Skip to content

Instantly share code, notes, and snippets.

View SidWorks's full-sized avatar

Som SidWorks

  • India
View GitHub Profile
@SidWorks
SidWorks / ditchClasses.txt
Last active February 5, 2022 05:39
Classless JavaScript- Use Modules Instead of Classes
class Sentence{
constructor(phrase){
this.phrase = phrase
}
startCase(){
this.phrase = this.phrase
.toLowerCase()
.split(' ')
.map(s => s.charAt(0).toUpperCase() + s.substring(1))