loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.3657422782401403","path":"main.js","file":{"path":"main.js","content":{"asEncoding":{"base64":"Ly8gRGF0ZSBvYmplY3QgaW5zdGFuY2UKdmFyIHRvZGF5ID0gbmV3IERhdGUoKTsKLy90b2RheSBpcyBhIGZ1bGwtZmxlZGdlZCBvYmplY3QgdGhhdCBjYW4gbGV2ZXJhZ2UgbWV0aG9kcyBmcm9tIHRoZSBEYXRlIGRhdGEgdHlwZQpjb25zb2xlLmxvZyh0b2RheSk7CmNvbnNvbGUubG9nKHRvZGF5LmdldEZ1bGxZZWFyKCkpOwpjb25zb2xlLmxvZyh0b2RheS5nZXREYXRlKCkpOwpjb25zb2xlLmxvZyh0b2RheS50b0xvY2FsZURhdGVTdHJpbmcoImVuLVVTIikpOwoKCi8vIERhdGUgdHlwZSBhbHNvIGhhcyB0aGUgc3RhdGljIG5vdygpIG1ldGhvZCB3aGljaCBjYW4gYmUgY2FsbGVkIHdpdGhvdXQgbmV3ICAKdmFyIHRvZGF5U3RhdGljID0gRGF0ZS5ub3coKTsKCi8vIHRvZGF5U3RhdGljIGlzIGEgcGxhaW4gdGltZXN0YW1wIChzdGF0aWMpIHZhbHVlLCB3aXRoIG5vIGFjY2VzcyB0byBvdGhlciBtZXRob2RzCmNvbnNvbGUubG9nKHRvZGF5U3RhdGljKTsKCi8vIE1hdGggZGF0YSB0eXBlIGlzIGNvbXBvc2VkIG9mIGFsbCBzdGF0aWMgcHJvcGVydGllcyBhbmQgbWV0aG9kcyAKLy8gbmV3IGlzIG5ldmVyIHVzZWQgc2luY2UgdmFsdWVzIGRvbid0IGNoYW5nZSBiYXNlZCBvbiBhbiBvYmplY3QgaW5zdGFuY2UgCmNvbnNvbGUubG9nKE1hdGguUEkpOwpjb25zb2xlLmxvZyhNYXRoLnBvdygyLDIpKTsKCnZhciBzcXVhcmUgPSBNYXRoLnBvdygyLCAzKTsKY29uc29sZS5sb2coc3F1YXJlKTsK"},"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
// Date object instance
var today = new Date();
//today is a full-fledged object that can leverage methods from the Date data type
console.log(today);
console.log(today.getFullYear());
console.log(today.getDate());
console.log(today.toLocaleDateString("en-US"));


// Date type also has the static now() method which can be called without new  
var todayStatic = Date.now();

// todayStatic is a plain timestamp (static) value, with no access to other methods
console.log(todayStatic);

// Math data type is composed of all static properties and methods 
// new is never used since values don't change based on an object instance 
console.log(Math.PI);
console.log(Math.pow(2,2));

var square = Math.pow(2, 3);
console.log(square);
Native Browser JavaScript