javascript for backend

Solutions on MaxInterview for javascript for backend by the best coders in the world

showing results for - "javascript for backend"
Iliana
09 Feb 2019
1//using es6 classes
2class Vehicle {
3  constructor(name, maker, engine) {
4    this.name = name;
5    this.maker =  maker;
6    this.engine = engine;
7  }
8}
9  
10let car1 = new Vehicle('GT', 'BMW', '1998cc');
11  
12console.log(car1.name);  // GT
13