loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.06168428138253401","path":"main.js","file":{"path":"main.js","content":{"asEncoding":{"base64":"Y2xhc3MgTGFuZ3VhZ2UgIHsKICAgY29uc3RydWN0b3IobmFtZSx2ZXJzaW9uKSB7CiAgICAgdGhpcy5fbmFtZSA9IG5hbWU7CiAgICAgdGhpcy5fdmVyc2lvbiA9IHZlcnNpb247CiAgIH0KICAgZ2V0IG5hbWUoKSB7CiAgICAgcmV0dXJuIHRoaXMuX25hbWU7CiAgIH0KICAgc2V0IG5hbWUodmFsdWUpIHsKICAgICB0aGlzLl9uYW1lID0gdmFsdWU7CiAgIH0KICAgZ2V0IHZlcnNpb24oKSB7CiAgICAgcmV0dXJuIHRoaXMuX3ZlcnNpb247CiAgIH0KICAgc2V0IHZlcnNpb24odmFsdWUpIHsKICAgICB0aGlzLl92ZXJzaW9uID0gdmFsdWU7CiAgIH0KICAgaGVsbG8oKSB7CiAgICAgcmV0dXJuICJIZWxsbyBmcm9tICIgKyB0aGlzLm5hbWU7CiAgIH0KfQoKLy8gQ3JlYXRlIG9iamVjdCBpbnN0YW5jZXMgZnJvbSBjbGFzcwpsZXQgamF2YXNjcmlwdCA9IG5ldyBMYW5ndWFnZSgiSmF2YVNjcmlwdCIsIjUiKTsKCi8vIFZlcmlmeSBwcm9wZXJ0eSB2YWx1ZSBhY2Nlc3MgdGhyb3VnaCBnZXR0ZXJzIApjb25zb2xlLmxvZyhqYXZhc2NyaXB0Lm5hbWUpOwpjb25zb2xlLmxvZyhqYXZhc2NyaXB0LnZlcnNpb24pOwpjb25zb2xlLmxvZyhqYXZhc2NyaXB0LmhlbGxvKCkpOwoKLy8gUmVhc3NpZ24gcHJvcGVydHkgdmFsdWVzIHRocm91Z2ggc2V0dGVycwpqYXZhc2NyaXB0Lm5hbWUgPSAiRUNNQVNjcmlwdCI7CmphdmFzY3JpcHQudmVyc2lvbiA9ICJFUzIwMTUiOwoKLy8gVmVyaWZ5IHByb3BlcnR5IHZhbHVlIHVwZGF0ZXMgdGhyb3VnaCBnZXR0ZXJzCmNvbnNvbGUubG9nKGphdmFzY3JpcHQubmFtZSk7CmNvbnNvbGUubG9nKGphdmFzY3JpcHQudmVyc2lvbik7CmNvbnNvbGUubG9nKGphdmFzY3JpcHQuaGVsbG8oKSk7"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class Language  {
   constructor(name,version) {
     this._name = name;
     this._version = version;
   }
   get name() {
     return this._name;
   }
   set name(value) {
     this._name = value;
   }
   get version() {
     return this._version;
   }
   set version(value) {
     this._version = value;
   }
   hello() {
     return "Hello from " + this.name;
   }
}

// Create object instances from class
let javascript = new Language("JavaScript","5");

// Verify property value access through getters 
console.log(javascript.name);
console.log(javascript.version);
console.log(javascript.hello());

// Reassign property values through setters
javascript.name = "ECMAScript";
javascript.version = "ES2015";

// Verify property value updates through getters
console.log(javascript.name);
console.log(javascript.version);
console.log(javascript.hello());
Native Browser JavaScript