> For the complete documentation index, see [llms.txt](https://april.gitbook.io/learning-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://april.gitbook.io/learning-js/chapter-9./9.2/9.2.4.md).

# 9.2.4 정적 메서드

* 클래스 메서드
* THIS 대신 클래스 이름을 사용

```javascript
class Car {
    static getNextVin() {
      return Car.nextVin++;
    }

    constructor (make, model) {
      this.make = make;
      this.model = model;
      this.vin = Car.getNextVin();

      console.log(this.vin);
    }

    static areSimilar(car1, car2) {
      return car1.make === car2.make && car1.model === car2.model;
    }

    static areSame(car1, car2) {
      return car1.vin === car2.vin;
    }
}

  Car.nextVin = 0;

  const car1 = new Car("Tesla", "S");
  const car2 = new Car("Mazda", "3");
  const car3 = new Car("Mazda", "3");

  car1.vin; // 0
  car2.vin; // 1
  car3.vin; // 2
```
