JavaScriptJavaScript · Lesson 16
ES6+ Essentials
Modules, classes, spread, optional chaining and modern syntax.
Video tutorialTrack course · freeCodeCamp
Speed
Transcript & captions
3/3
jsjs
// modules
export function add(a, b) { return a + b; }
import { add } from './math.js';
// classes
class Player {
#secret = 'hidden';
constructor(id, level) { this.id = id; this.level = level; }
get tag() { return this.id.toUpperCase(); }
static create(id) { return new Player(id, 1); }
}Try it yourself
Knowledge check
0/1 answeredWhich keyword accesses the parent class implementation?