'use strict'; 
class Point {
 constructor(xPos, yPos) {
 this.xPos = xPos;
 this.yPos = yPos;
 }
 getPos() {
 return "X: " + this.xPos + ' Y: ' + this.yPos;
 }
}

var point = new Point(100, 200);
console.log("Point pos: " + point.getPos());

The ‘use strict’ prevents certain actions from being taken and throws more exceptions.