tokei/tests/data/javascript.js
2020-05-31 13:55:17 +02:00

34 lines
437 B
JavaScript

// 33 lines, 14 code, 12 comments, 7 blanks
/*
* /* Nested comment
* // single line comment
* */
/*
function add(a, b) {
return a + b;
}
*/
class Rectangle {
constructor(width, height) {
this.width = width;
this.height = height;
}
get area() {
return this.calcArea();
}
calcArea() {
return this.width * this.height;
}
}
let rect = new Rectangle(20, 20);
console.log(rect.area); // 400
// Comment