loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.3555172251952372","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"CgpsZXQgZ2V0VXNlciA9IChmaXJzdG5hbWUsbGFzdG5hbWUsYWdlKSA9PiB7CgogICBjb25zb2xlLmxvZygiSGksIE15IE5hbWUgaXMgIitmaXJzdG5hbWUrIiAiK2xhc3RuYW1lKyIgYW5kIEFnZSBpcyAiK2FnZSk7Cn0KCmdldFVzZXIoIkpvaG4iLCJTb25tZXoiLDI1KTsKCmZ1bmN0aW9uIGdldHVzZXJDdXJyeShmaXJzdG5hbWUpIHsKCiAgcmV0dXJuIGZ1bmN0aW9uKGxhc3RuYW1lKSB7CiAgICByZXR1cm4gZnVuY3Rpb24oYWdlKSB7CiAgICAgIGNvbnNvbGUubG9nKCJIaSwgTXkgTmFtZSBpcyAiK2ZpcnN0bmFtZSsiICIrbGFzdG5hbWUrIiBhbmQgQWdlIGlzICIrYWdlKTsKICAgIH0KICB9Cn0KCmdldHVzZXJDdXJyeSgiQ3VycnkiKSgiRnVuY3Rpb24iKSgyMik7CgovLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0vLwoKbGV0IHVzZXJzID0gWwogIHsKICAgICJpZCIgOiAxLAogICAgIm5hbWUiIDogIkpvaG4iLAogICAgImFnZSIgOiAyMgogIH0sCiAgewogICAgImlkIiA6IDIsCiAgICAibmFtZSIgOiAiUGV0ZXJzIiwKICAgICJhZ2UiIDogMjMKICB9LAogIHsKICAgICJpZCIgOiAzLAogICAgIm5hbWUiIDogIlNtaXRoIiwKICAgICJhZ2UiIDogMjQKICB9LAogIHsKICAgICJpZCIgOiA0LAogICAgIm5hbWUiIDogIldvYWtlcyIsCiAgICAiYWdlIiA6IDI1CiAgfQpdCgpsZXQgdXNlcmlkcyA9IHVzZXJzLm1hcChpdGVtID0+IGl0ZW0uaWQpCgpjb25zb2xlLmxvZyh1c2VyaWRzKTsKCmxldCBuYW1lcyA9IFsKICB7CiAgICAiaWQiIDogNSwKICAgICJuYW1lIiA6ICJkZmRzZmRzIiwKICAgICJhZ2UiIDogMjIKICB9LAogIHsKICAgICJpZCIgOiA2LAogICAgIm5hbWUiIDogImV3cndlciIsCiAgICAiYWdlIiA6IDIzCiAgfSwKICB7CiAgICAiaWQiIDogNywKICAgICJuYW1lIiA6ICJyZXRyZXRyZXQiLAogICAgImFnZSIgOiAyNAogIH0sCiAgewogICAgImlkIiA6IDgsCiAgICAibmFtZSIgOiAidHlyeXQiLAogICAgImFnZSIgOiAyNQogIH0KXQoKY29uc3QgZ2V0ID0gZnVuY3Rpb24ocHJvcGVydHkpIHsKICByZXR1cm4gZnVuY3Rpb24ob2JqZWN0KSB7CiAgICAgIHJldHVybiBvYmplY3RbcHJvcGVydHldOwogIH0KfQoKY29uc3QgZ2V0SWQgPSBnZXQoJ2lkJyk7CgpsZXQgdXNlcmlkcyA9IHVzZXJzLm1hcChnZXRJZCk7Cgpjb25zb2xlLmxvZygidXNlcmlkcyIsdXNlcmlkcyk7Cgpjb25zdCBuYW1lbGlzdCA9IG5hbWVzLm1hcChnZXRJZCk7Cgpjb25zb2xlLmxvZygibmFtZWxpc3QiLG5hbWVsaXN0KTsKCg=="},"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

let getUser = (firstname,lastname,age) => {

   console.log("Hi, My Name is "+firstname+" "+lastname+" and Age is "+age);
}

getUser("John","Sonmez",25);

function getuserCurry(firstname) {

  return function(lastname) {
    return function(age) {
      console.log("Hi, My Name is "+firstname+" "+lastname+" and Age is "+age);
    }
  }
}

getuserCurry("Curry")("Function")(22);

//========================================//

let users = [
  {
    "id" : 1,
    "name" : "John",
    "age" : 22
  },
  {
    "id" : 2,
    "name" : "Peters",
    "age" : 23
  },
  {
    "id" : 3,
    "name" : "Smith",
    "age" : 24
  },
  {
    "id" : 4,
    "name" : "Woakes",
    "age" : 25
  }
]

let userids = users.map(item => item.id)

console.log(userids);

let names = [
  {
    "id" : 5,
    "name" : "dfdsfds",
    "age" : 22
  },
  {
    "id" : 6,
    "name" : "ewrwer",
    "age" : 23
  },
  {
    "id" : 7,
    "name" : "retretret",
    "age" : 24
  },
  {
    "id" : 8,
    "name" : "tyryt",
    "age" : 25
  }
]

const get = function(property) {
  return function(object) {
      return object[property];
  }
}

const getId = get('id');

let userids = users.map(getId);

console.log("userids",userids);

const namelist = names.map(getId);

console.log("namelist",namelist);

node v10.16.0