@vkajdacsi/

IncompleteFrillyComputation

Nodejs

No description

fork
loading
Files
  • index.js

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.33111037162466017","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"ZnVuY3Rpb24gZXhlcmNpc2VPbmUobmFtZXMpewovLyBFeGVyY2lzZSBPbmU6IEluIHRoaXMgZXhlcmNpc2UgeW91IHdpbGwgYmUgZ2l2ZW4gYW5kIGFycmF5IGNhbGxlZCBuYW1lcy4KLy8gVXNpbmcgdGhlIGZvckVhY2ggbWV0aG9kIGFuZCBhIGNhbGxiYWNrIGFzIGl0J3Mgb25seSBhcmd1bWVudCwgY29uc29sZSBsb2cgCi8vIGVhY2ggb2YgdGhlIG5hbWVzLgogIGNvbnNvbGUubG9nKG5hbWVzKQp9Cm5hbWVzLmZvckVhY2goZXhlcmNpc2VPbmUpOwoKZnVuY3Rpb24gZXhlcmNpc2VUd28oY2VudHMpewovLyBFeGVyY2lzZSBUd286IEluIHRoaXMgZXhlcmNpc2UgeW91IHdpbGwgYmUgZ2l2ZW4gYW4gYXJyYXkgY2FsbGVkICdjZW50cycKLy8gVGhpcyBhcnJheSBpcyBhIGxpc3Qgb2YgcHJpY2VzLCBidXQgZXZlcnl0aGluZyBpcyBpbiBjZW50cyBpbnN0ZWFkIG9mIGRvbGxhcnMuCi8vIFVzaW5nIHRoZSBtYXAgbWV0aG9kLCBkaXZpZGUgZXZlcnkgdmFsdWUgYnkgMTAwIGFuZCBzYXZlIGl0IGFzIGEgbmV3IGFycmF5ICdkb2xsYXJzJwpsZXQgZG9sbGFycyA9IFtdOwpmb3IgKGxldCBpID0gMDsgaSA8IGNlbnRzLmxlbmd0aDsgaSsrKXsKICBsZXQgTmV3VmFsdWVzID0gKGNlbnRzW2ldIC8gMTAwKTsKICBkb2xsYXJzLnB1c2goTmV3VmFsdWVzKTsKfQovLyBQbGVhc2Ugd3JpdGUgeW91ciBhbnN3ZXIgaW4gdGhlIGxpbmVzIGFib3ZlLgogIHJldHVybiBkb2xsYXJzOwp9Cg=="},"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
function exerciseOne(names){
// Exercise One: In this exercise you will be given and array called names.
// Using the forEach method and a callback as it's only argument, console log 
// each of the names.
  console.log(names)
}
names.forEach(exerciseOne);

function exerciseTwo(cents){
// Exercise Two: In this exercise you will be given an array called 'cents'
// This array is a list of prices, but everything is in cents instead of dollars.
// Using the map method, divide every value by 100 and save it as a new array 'dollars'
let dollars = [];
for (let i = 0; i < cents.length; i++){
  let NewValues = (cents[i] / 100);
  dollars.push(NewValues);
}
// Please write your answer in the lines above.
  return dollars;
}
node v10.16.0