loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.61418244180846","path":"main.js","file":{"path":"main.js","content":{"asEncoding":{"base64":"bGV0IG5hbWUgPSAiUHl0aG9uIjsKbGV0IHZlcnNpb24gPSAiMi43IjsKCi8vIFNpbmdsZSByZWZlcmVuY2UgaXMgZW5vdWdoIHRvIHNldCBwcm9wZXJ0eSBuYW1lL3ZhbHVlCmxldCBsaXRlcmFsTGFuZ3VhZ2UgPSB7CiAgbmFtZSwKICB2ZXJzaW9uLAogIC8vIFByb3BlcnRpZXMgd2l0aCAoKSB7fSBhcmUgaW1wbGllZCBtZXRob2RzICYgZG9uJ3QgcmVxdWlyZSB0aGUgZnVuY3Rpb24ga2V5d29yZAogIGhlbGxvKCkgeyByZXR1cm4gIkhlbGxvIGZyb20gIiArIHRoaXMubmFtZX0KICB9Cgpjb25zb2xlLmxvZyhsaXRlcmFsTGFuZ3VhZ2UpOwpjb25zb2xlLmxvZyhsaXRlcmFsTGFuZ3VhZ2UuaGVsbG8oKSk7CgpsZXQgamF2YXNjcmlwdENyZWF0b3IgPSAnQnJhbmRhbiBFaWNoJzsKbGV0IHB5dGhvbkNyZWF0b3IgPSAnR3VpZG8gdmFuIFJvc3N1bSc7CgpsZXQgcGxhY2Vob2xkZXIgPSAiZWNobyI7CgovLyBQcm9wZXJ0aWVzIGNhbiBiZSBkeW5hbWljYWxseSBhc3NpZ25lZCBhdCBpbml0aWFsaXphdGlvbiB3aXRoIFtdCmxldCBjcmVhdG9yTmFtZXMgPSB7IAogICAgIFtweXRob25DcmVhdG9yXTogJ1B5dGhvbicsCiAgICAgW2phdmFzY3JpcHRDcmVhdG9yXTogJ0phdmFTY3JpcHQnLAogICAgIFtwbGFjZWhvbGRlcl0obWVzc2FnZSkgeyByZXR1cm4gbWVzc2FnZX0gCn0KCmNvbnNvbGUubG9nKGNyZWF0b3JOYW1lcyk7CmNvbnNvbGUubG9nKGNyZWF0b3JOYW1lcy5lY2hvKCJIZ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sYXJlIHByb3BlcnR5IG5hbWUvdmFsdWUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAp2YXIgbGl0ZXJhbExhbmd1YWdlID0geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICBuYW1lOiBuYW1lLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICB2ZXJzaW9uOiB2ZXJzaW9uLAogICAgLy8gTWV0aG9kIHByb3BlcnRpZXMgcmVxdWlyZSB0byBleHBsaWNpdGx5IGRlY2xhcmUgdGhlIGZ1bmN0aW9uKCkga2V5d29yZAogICAgaGVsbG86IGZ1bmN0aW9uKCkgeyByZXR1cm4gIkhlbGxvIGZyb20gIiArIHRoaXMubmFtZX0gICAgICAgCn07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCmNvbnNvbGUubG9nKGxpdGVyYWxMYW5ndWFnZSk7ICAKY29uc29sZS5sb2cobGl0ZXJhbExhbmd1YWdlLmhlbGxvKCkpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCnZhciBqYXZhc2NyaXB0Q3JlYXRvciA9ICdCcmFuZGFuIEVpY2gnOwp2YXIgcHl0aG9uQ3JlYXRvciA9ICdHdWlkbyB2YW4gUm9zc3VtJzsKCnZhciBwbGFjZWhvbGRlciA9ICJlY2hvIjsKCi8vIFByb3BlcnRpZXMgY2Fubm90IGJlIGR5bmFtaWNhbGx5IGFzc2lnbmVkIGF0IGluaXRpYWxpemF0aW9uIAp2YXIgY3JlYXRvck5hbWVzID0geyB9CgovLyBQcm9wZXJ0aWVzIGNhbiBiZSBkeW5hbWljYWxseSBhc3NpZ25lZCBhZnRlciBpbml0aWFsaXphdGlvbgpjcmVhdG9yTmFtZXNbcHl0aG9uQ3JlYXRvcl0gPSAnUHl0aG9uJzsKY3JlYXRvck5hbWVzW2phdmFzY3JpcHRDcmVhdG9yXSA9ICdKYXZhU2NyaXB0JzsKY3JlYXRvck5hbWVzW3BsYWNlaG9sZGVyXSA9IGZ1bmN0aW9uKG1lc3NhZ2UpIHsgcmV0dXJuIG1lc3NhZ2UgfQoKY29uc29sZS5sb2coY3JlYXRvck5hbWVzKTsKY29uc29sZS5sb2coY3JlYXRvck5hbWVzLmVjaG8oIkhlbGxvIHRoZXJlISIpKTsKCnZhciB2b3dlbHMgPSB7IAogICdhJzogJ0ZpcnN0IHZvd2VsJywKICAnZSc6ICdTZWNvbmQgdm93ZWwnLAogICdpJzogJ1RoaXJkIHZvd2VsJywKICAnbyc6ICdGb3VydGggdm93ZWwnLAogICd1JzogJ0ZpZnRoIHZvd2VsJwp9CgovLyBPYmplY3QgbXVzdCBiZSBkZWNvbnN0cnVjdGVkIGV4cGxpY3RseQp2YXIgYSA9IHZvd2Vscy5hLCBlID0gdm93ZWxzLmUsIGkgPSB2b3dlbHMuaSwgbyA9IHZvd2Vscy5vLCB1PXZvd2Vscy51OwoKLy8gVmFyaWFibGVzIGF2YWlsYWJsZSBhZnRlciBvYmplY3QgZGVjb25zdHJ1Y3Rpb24KY29uc29sZS5sb2coYSxlLGksbyx1KTsKICov"},"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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
let name = "Python";
let version = "2.7";

// Single reference is enough to set property name/value
let literalLanguage = {
  name,
  version,
  // Properties with () {} are implied methods & don't require the function keyword
  hello() { return "Hello from " + this.name}
  }

console.log(literalLanguage);
console.log(literalLanguage.hello());

let javascriptCreator = 'Brandan Eich';
let pythonCreator = 'Guido van Rossum';

let placeholder = "echo";

// Properties can be dynamically assigned at initialization with []
let creatorNames = { 
     [pythonCreator]: 'Python',
     [javascriptCreator]: 'JavaScript',
     [placeholder](message) { return message} 
}

console.log(creatorNames);
console.log(creatorNames.echo("Hello there!"));

let vowels = { 
  'a': 'First vowel',
  'e': 'Second vowel',
  'i': 'Third vowel',
  'o': 'Fourth vowel',
  'u': 'Fifth vowel'
}

// Object can be deconstructed and assigned to variables by property name
let { a, e, i, o, u } = vowels;

// Variables available after object deconstruction
console.log(a,e,i,o,u);

// Object can also be deconstructed and assigned to custom variables assigned by property name
let { a: lettera, e: lettere, i: letteri, o: lettero, u: letteru} = vowels;

// Custom variables available after object deconstruction
console.log(lettera,lettere,letteri,lettero,letteru);


/** 
// ES5 variation 


var name = "Python";                                                     
var version = "2.7";                                                     

// Explictly declare property name/value                             
var literalLanguage = {                                                  
    name: name,                                                                       
    version: version,
    // Method properties require to explicitly declare the function() keyword
    hello: function() { return "Hello from " + this.name}       
};                                                                       

console.log(literalLanguage);  
console.log(literalLanguage.hello());                                        

var javascriptCreator = 'Brandan Eich';
var pythonCreator = 'Guido van Rossum';

var placeholder = "echo";

// Properties cannot be dynamically assigned at initialization 
var creatorNames = { }

// Properties can be dynamically assigned after initialization
creatorNames[pythonCreator] = 'Python';
creatorNames[javascriptCreator] = 'JavaScript';
creatorNames[placeholder] = function(message) { return message }

console.log(creatorNames);
console.log(creatorNames.echo("Hello there!"));

var vowels = { 
  'a': 'First vowel',
  'e': 'Second vowel',
  'i': 'Third vowel',
  'o': 'Fourth vowel',
  'u': 'Fifth vowel'
}

// Object must be deconstructed explictly
var a = vowels.a, e = vowels.e, i = vowels.i, o = vowels.o, u=vowels.u;

// Variables available after object deconstruction
console.log(a,e,i,o,u);
 */
Native Browser JavaScript