Skip to content

Conversation

@JakubMatwiejew
Copy link

No description provided.

Copy link
Contributor

@Ami777 Ami777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jest super.

if (err === null){
console.log('Poprawnie odczytano tablicę:', data);
const arr = JSON.parse(data);
let sum = arr.reduce(function (a, b) {return a + b;}, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Też może być const.

if (err === null){
console.log('Lista plików:');
files.forEach(file => {
console.log(file);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brakuje odczytu zwartości pliku.

fs.readFile('./data/zadanieDnia/test.txt', 'utf8', (err, data) => {
if (err === null){
let text = data;
let res = text.split('').map(function(v,i){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Najlepsze rozwiązanie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants