Demo entry 2396480

Javascript ES6 Class

   

Submitted by Ali on Aug 18, 2015 at 16:06
Language: JavaScript. Code size: 137 Bytes.

class Model {
  constructor(properties) {
    this.properties = properties;
  }

  toObject() {
    return this.properties;
  }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).