드림코딩

    [TIL] 클린 코딩 팁 3가지

    1. DRY(Don't Repeat Yourself) WET(Write Everything Twice) // bad function greetings(user) { return `Hi ${user.firstName} ${user.lastName}`; } function goodbye(user) { return `See you next time ${user.firstName} ${user.lastName}`; } // good class User { fullName() { return `${this.firstName} ${user.middleName} ${this.LastName}`; } } 2. KISS(Keep It Simple, Stupid) // bad function getFirst(array, ..