Skip to content

JS functions: complete tasks#150

Open
Katalia91 wants to merge 6 commits intodevmentor-pl:masterfrom
Katalia91:master
Open

JS functions: complete tasks#150
Katalia91 wants to merge 6 commits intodevmentor-pl:masterfrom
Katalia91:master

Conversation

@Katalia91
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Owner

@devmentor-pl devmentor-pl left a comment

Choose a reason for hiding this comment

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

Natalio,

Super 👍
Zostawiłem drobną uwagę do pierwszego zadania :)

01/app.js Outdated
@@ -0,0 +1,7 @@
const time = new Date().toLocaleTimeString();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Uważaj na miejsce "deklaracji" takiej zmiennej. To zadanie jest ok, ale jeśli np. funkcja showCurrentTime będzie uruchamiana dopiero po kliknięciu np. w button. To czas jaki zostanie pokazany to nie moment kliknięcie w button. Tylko moment załadowania strony (wtedy zapisujesz czas do zmiennej). Jeśli pobierzesz czas wew. funkcji to będzie bardziej elastyczne rozwiązanie (czas zostanie pobrany w momencie uruchomienia funkcji).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@devmentor-pl W zadaniu 04 poprawiłam podobny błąd, ale już nie wróciłam do zadania 01. Teraz już poprawiłam, będę o tym pamiętać!

function sayHello(firstName) {
console.log(`Cześć ${firstName}!`);
}
sayHello("Natalia");
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

return sum;
};

console.log(sumNumbers(5));
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

}
}, 5000);
};
runTimer();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

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