Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Why should I even do this assignment?

Functions and conditions are some of the basic building blocks of javascript. Functions ensure that we don't repeat ourselves when writing code. Conditions ensures that we can handle different cases when programming.
Functions and conditions are some of the basic building blocks of javascript. Functions ensure that we don't repeat ourselves when writing code. Conditions ensure that we can handle different cases when programming.

If you struggle to do this weeks assignment, read up on [JavaScript basics](README.md#recap-logical-operators).

Expand Down
14 changes: 14 additions & 0 deletions courses/foundation/intro-to-javascript/week4/session-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@ Write a function that counts the frequency of characters in a string:
```js
console.log(getCharacterFrequencies("happy"));
/*
{
h: 1,
a: 1,
p: 2,
y: 1
}
*/
```

The expected output above allows for a relatively simple solution mechanism. Hint: Think about using object property accessors.
For a bigger challenge, you can try to write the same function for a different expected output as seen below. It will require implementing some additional logic.

```js
/*
{
characters: [
{
Expand Down