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
6 changes: 3 additions & 3 deletions contributing/meetings/2025 27th April.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
### 1. Thanks

Mega thanks to Rachel for setting _so_ much good stuff in the new repo, linting, link checking, and moving ALL of our legacy modules over into the monorepo.
Also mega thanks to Natlia for putting together the proposal for splitting js/node - the biggest remaining puzzle piece in the curriculum.
Also mega thanks to Natalia for putting together the proposal for splitting js/node - the biggest remaining puzzle piece in the curriculum.

### 2. Reflection

#### Things that didn't work so well

- Review requires on PRs to 1? Yes.
- Bit unclear where to have discussions (some slack, pr, issue). Finding it is hard. Keep slack discussions linked/sumarised into PRs.
- Bit unclear where to have discussions (some slack, pr, issue). Finding it is hard. Keep slack discussions linked/summarised into PRs.
- Tasks were quite broad at this point, difficult to estimate, hard to take a task because of this
- Some felt like they couldn't contribute much recently. **Important note:** Being engaged, following conversations, replying with feedback, is all really helpful too and super appreciated, even if you're week is too busy to take a task on your own.

Expand All @@ -35,7 +35,7 @@ Also mega thanks to Natlia for putting together the proposal for splitting js/no

#### Actions

1. Switch to one required reviewer (update contributing readme, share in slack. note that more reviewers should often be requested when necessray (give examples) it's just not enforced in github). Reminder that all staff can merge stuff, if it's fully approved, ping anyone if something is blocked.
1. Switch to one required reviewer (update contributing readme, share in slack. note that more reviewers should often be requested when necessary (give examples) it's just not enforced in github). Reminder that all staff can merge stuff, if it's fully approved, ping anyone if something is blocked.
2. Keep meeting agendas/notes in github, link to them from other places (invites, slack reminders).
3. Continue to consider how to best keep conversations in the right/organised places, it feels disjointed right now.

Expand Down
4 changes: 2 additions & 2 deletions courses/Foundation/intro-to-javascript/week1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- [ ] Console.log
- [ ] [Variables: var, let, const](#variables)
- [ ] [Types](#types): [String](#string), [number](#number), boolean, [null, undefined](#null--undefined), [array](#array)
- [ ] [Operators](#comparison-operators): Comparision, addition, subtraction, multiplication, division, modulus, increment, decrement
- [ ] [Operators](#comparison-operators): Comparison, addition, subtraction, multiplication, division, modulus, increment, decrement
- [ ] Errors: How to read and fix errors

Focus on how to read documentation, google answers and google errors
Expand All @@ -22,7 +22,7 @@ Focus on how to read documentation, google answers and google errors

A "variable" is a place where you can store information, such as a string, or a number. New variables in JavaScript are declared using one of three keywords: let, const, or var.

> Think of variables names like **labels** on boxes, while the value of the variable are the **contents** of the box - you could change the contents of a box and leave the label intact, the contents of the boxes can have different types, the boxes should have good labels (a box of books being labeled pens would be very confusing),
> Think of variables names like **labels** on boxes, while the value of the variable are the **contents** of the box - you could change the contents of a box and leave the label intact, the contents of the boxes can have different types, the boxes should have good labels (a box of books being labelled pens would be very confusing),
>
> ![Variables are like boxes](./assets/box.png)
> Photo from [Khan Academy](https://cs-blog.khanacademy.org/2013/09/teaching-variables-analogies-and.html)
Expand Down
8 changes: 4 additions & 4 deletions courses/Foundation/intro-to-javascript/week1/assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ If you struggle to do this weeks assignment there are a couple of things to do:

Lets get started with some warm up exercises: On freeCodeCamp.com do the [Basic JavaScript](https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript) exercises up and until the **"Manipulate Arrays With push()"** exercise (there are some topics we did not cover but you can do it).

Please add your freecodecamp username as answer for this exercise!
Please add your freeCodeCamp username as answer for this exercise!

You have finished the warmup exercises, well done!

Expand All @@ -65,7 +65,7 @@ Cool now lets venture into the world and see which problems we can solve with so

### Age-ify (A future age calculator)

> You are talking to a friend who suddently looks at you and asks: "How old will you be in 2045?" Hmm you remember the year you were born and try to do some calculation: Born in 1987 + 3 that's 1990. 90 - 40 is 50 + 5 thats 58. I will be 58! Wow that was painful! Let's fix that by making some code that automatically does this!
> You are talking to a friend who suddenly looks at you and asks: "How old will you be in 2045?" Hmm you remember the year you were born and try to do some calculation: Born in 1987 + 3 that's 1990. 90 - 40 is 50 + 5 that's 58. I will be 58! Wow that was painful! Let's fix that by making some code that automatically does this!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Born in 1987 + 3 that's 1990. 90 - 40 is 50 + 5 that's 58. I will be 58!

"50 + 5 that's 58"? Not a spelling issue, but this could do with rewording! 😅 Perhaps in another PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Maybe, follow up PRs with pasting .md in a setup where Grammarly could flag issues.


Create two variables called `yearOfBirth` and `yearFuture`. Assign these your birth year and a future year.
What type will these two variables be? Using `yearOfBirth` and `yearFuture` calculate the age and store that in a variable called `age`.
Expand Down Expand Up @@ -118,7 +118,7 @@ const randomNumber = Math.floor(Math.random() * 10);

---

4 projects from one startup, thats incredible! Lets hope one or more of these projects actually becomes popular!
4 projects from one startup, that's incredible! Lets hope one or more of these projects actually becomes popular!

To be continued...

Expand All @@ -140,7 +140,7 @@ Using the branch called `javascript-javascript1-week1`

---

To add your files go to the folder `javascript/javascript1/week1`. Here you **add all the files relevant for the assignment**. Remember to **seperate the code into meaningful commits**. You can now push the commits
To add your files go to the folder `javascript/javascript1/week1`. Here you **add all the files relevant for the assignment**. Remember to **separate the code into meaningful commits**. You can now push the commits

```shell
git add <file_name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Now we will modify the program so that you can order multiple pizzas and also de

3. Now write a formula to calculate the total price of your pizza order, and save it in a variable called totalPrice (if the pizza is family size the prize of the pizza is doubled.

4. Modify the log statement for the pizza man so it includes wether or not the pizza is family size, and now show the total price of the order
4. Modify the log statement for the pizza man so it includes whether or not the pizza is family size, and now show the total price of the order
`New pizza order: <amount of pizzas> <family or not?> <name of pizza>. Total cost for the order is: <total price>`

5. Try to change the price of the pizza and if the pizza should be family size, and then check if the total price is calculated correctly.
40 changes: 20 additions & 20 deletions courses/Foundation/intro-to-javascript/week2/assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you struggle to do this weeks assignment there are a couple of things to do:

Just like last the last assignment, lets **warmup our brain**!

Do these freecodecamp challenges. We know this seems like a lot, but the tasks are not so big, so hang in there! If you get stuck on one of the tasks, just go to the next and then return to the difficult task later on.
Do these freeCodeCamp challenges. We know this seems like a lot, but the tasks are not so big, so hang in there! If you get stuck on one of the tasks, just go to the next and then return to the difficult task later on.

- [ ] [Passing values to functions with arguments](https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments/)
- [ ] [Return a value from a function with return](https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return/)
Expand All @@ -49,7 +49,7 @@ Do these freecodecamp challenges. We know this seems like a lot, but the tasks a
- [ ] [Iterate with javascript for loops](https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops/)
- [ ] [Iterate through an array with a for loop](https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-through-an-array-with-a-for-loop/)

Please add your freecodecamp username as answer for this exercise!
Please add your freeCodeCamp username as answer for this exercise!

## Step 3: Smart-ease - Goes Global!

Expand All @@ -61,52 +61,52 @@ BUT people are asking: What will be the next product that truly defines Smart-ea

Even for a startup as successful as Smart-ease there needs to be money in the bank. A customer from a flight booking website has asked for our help creating a specific part of their application:

When a user books a flight they **write their firstname and surname**, but when the ticket is printed a **fullname should be displayed**. It is our responsibility to create that.
When a user books a flight they **write their firstName and surname**, but when the ticket is printed a **fullname should be displayed**. It is our responsibility to create that.

Create a function called `getFullname` that returns a fullname.
It should have two parameters: `firstname` and `surname`.
Create a function called `getFullName` that returns a fullname.
It should have two parameters: `firstName` and `surname`.

```js
getFullname("Benjamin", "Hughes"); // returns "Benjamin Hughes"
getFullName("Benjamin", "Hughes"); // returns "Benjamin Hughes"
```

Now try to create two variables `fullname1` and `fullname2` these two variables should be assigned to calling the `getFullname` function.
Now try to create two variables `fullName1` and `fullName2` these two variables should be assigned to calling the `getFullName` function.

Log out the two fullname variables.

#### Formal fullname

On the flight website the user has the possibility to **check a checkbox** that **indicates** if the user wants to be **adressed formally**. Lets also change `getFullname` to include support for formal name.
On the flight website the user has the possibility to **check a checkbox** that **indicates** if the user wants to be **addressed formally**. Lets also change `getFullName` to include support for formal name.

Create an extra parameter `useFormalName` that is a boolean. If it is true the function should add a `Lord` in front of the name.

```js
getFullname("Benjamin", "Hughes", true); // returns "Lord Benjamin Hughes"`
getFullname("Benjamin", "Hughes", false); // returns "Benjamin Hughes"
getFullName("Benjamin", "Hughes", true); // returns "Lord Benjamin Hughes"`
getFullName("Benjamin", "Hughes", false); // returns "Benjamin Hughes"
```

What do we do if `useFormalName` is not given as an argument?

Remember to consider someone calling the function with an empty string as firstname and lastname.
Remember to consider someone calling the function with an empty string as `firstName` and `lastName`.

Try out your code by pasting your `getFullname` function in the javascript part of this codepen: <https://codepen.io/hackyourfuture-cph/pen/jJWwbN>
Try out your code by pasting your `getFullName` function in the javascript part of this codePen: <https://codepen.io/hackyourfuture-cph/pen/jJWwbN>

But what if the person is a woman? Describe how you would fix the `getFullname` so it also works for women
But what if the person is a woman? Describe how you would fix the `getFullName` so it also works for women

### Event application

Another customer has contacted us. He works for a secret company that rimes with foogle. The customer works on their calendar application. They need some functionality to help with writing what weekday an event is held.

You specify how many days from today an event is being held. The function then figures out what weekday the event is being held. Here is an example:

Today is Sunday and the event is in 5 days. Therefore the event will be held on a friday.
Today is Sunday and the event is in 5 days. Therefore the event will be held on a Friday.

```js
// With todays weekday a tuesday
console.log(getEventWeekday(9)); // Logs out "Thursday"
// With today's weekday a tuesday
console.log(getEventWeekday(9)); // Outputs "Thursday"

// With todays weekday a Friday
console.log(getEventWeekday(2)); // Logs out "Sunday"
// With today's weekday a Friday
console.log(getEventWeekday(2)); // Outputs "Sunday"
```

You should get the today's day from the system.
Expand Down Expand Up @@ -174,7 +174,7 @@ To see your code applied on a webapp, go here: <https://codepen.io/hackyourfutur

### Candy helper _optional_

> We are at the candystore. We have taken some shovels of the **caramel-strawberry-cola-lemon-gravy winegums**, a few of the **banana chocolate diesel-motors** and a handful of the **salmon-potato covered toffee encrusted pizzas**. But what is all this worth? And can you even afford it?
> We are at the candy store. We have taken some shovels of the **caramel-strawberry-cola-lemon-gravy wine gums**, a few of the **banana chocolate diesel-motors** and a handful of the **salmon-potato covered toffee encrusted pizzas**. But what is all this worth? And can you even afford it?

Let's solve this problem with some functions.

Expand All @@ -183,7 +183,7 @@ Let's solve this problem with some functions.
Create a function called `addCandy`. It has two parameters:

- `candyType` - specifies the candy type. Could be 'sweet, chocolate, toffee or chewing-gum'
- `weight` - specifies the weigth of the candy in grams
- `weight` - specifies the weight of the candy in grams

The function should **add the price of the candy** to an array called `boughtCandyPrices` using [push](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push)

Expand Down
2 changes: 1 addition & 1 deletion courses/Foundation/intro-to-javascript/week3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Learning goals

- [ ] Arrays continued: pop, push, shift, unshift, length, indexOf. No map, filter or reduce
- [ ] [Objects](#objects): Access properties two ways, key value. Array of objects. Use real world examples (users, products, houselistings)
- [ ] [Objects](#objects): Access properties two ways, key value. Array of objects. Use real world examples (users, products, house listings)
- [ ] [Call stack](#call-stack)

## Relevant links
Expand Down
16 changes: 8 additions & 8 deletions courses/Foundation/intro-to-javascript/week3/assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Array's has lots of helper functions, that is used all the time when developing js applications. It is super helpful to be able to **manipulate an array** like **removing elements** or **adding elements** at specific indexes. Another helpful function of arrays is to know **where a specific item is** in the array.

Objects can be used for **representing data** and it can **help structure your code**. An object can e.g. represent a user that has a firstname, surname, profile picture and a list of friends. It is constantly used in javascript and **essential to learning the language**.
Objects can be used for **representing data** and it can **help structure your code**. An object can e.g. represent a user that has a first name, surname, profile picture and a list of friends. It is constantly used in javascript and **essential to learning the language**.

If you struggle to do this weeks assignment there are a couple of things to do:

Expand All @@ -31,7 +31,7 @@ const names = [
"kristina",
"Rasmus",
"Samuel",
"katrine",
"Katrine",
"Tala",
];
const nameToRemove = "Ahmad";
Expand All @@ -40,12 +40,12 @@ const nameToRemove = "Ahmad";

// Code done

console.log(names); // ['Peter', 'Yana', 'kristina', 'Rasmus', 'Samuel', 'katrine', 'Tala']
console.log(names); // ['Peter', 'Yana', 'kristina', 'Rasmus', 'Samuel', 'Katrine', 'Tala']
```

### When will we be there??

Write a function where you speficy your speed in `km/h` and how far you have to go in `km`. The function has to return the time it will take to arrive at your destination. The time should be formatted like this: `3 hours and 34 minutes`.
Write a function where you specify your speed in `km/h` and how far you have to go in `km`. The function has to return the time it will take to arrive at your destination. The time should be formatted like this: `3 hours and 34 minutes`.

_Hint:_ For formatting your best friend is Google!

Expand Down Expand Up @@ -86,7 +86,7 @@ const seriesDurations = [

How much time of my life have i been watching series on tv? Lets find out! Calculate **how much time a tv series** have taken as a **percentage of an average lifespan** of 80 years.

Firstly change the `seriesDurations` array found above to include your favorite series. Find the duration of a series here: <https://tiii.me/>
Firstly change the `seriesDurations` array found above to include your favourite series. Find the duration of a series here: <https://tiii.me/>

Create a function that logs out the following text using the `seriesDurations` array:

Expand Down Expand Up @@ -187,11 +187,11 @@ Suddenly you get this great idea for making the note app even better!

Come up with a unique feature **you think would make this app better.** Write down the idea and see if you can implement it. If not don't worry :) If it is too hard to implement try and ask in the slack channel :)

Try an **interactive version 💻 of your code** [here](https://codepen.io/dalsHughes/pen/poJGejX). Remember to insert your code in the top of the codepen :)
Try an **interactive version 💻 of your code** [here](https://codepen.io/dalsHughes/pen/poJGejX). Remember to insert your code in the top of the codePen :)

### CactusIO-interactive (Smart phone usage app) _optional_

> After a long day you come home to relax. The first thing you do is find your phone and start watching some youtube. Then check facebook, and then reading some news. Suddently a hour has passed. What happened to all that time you think to yourself. Maybe we can create some program to help with this problem! What if we could help users manage their smart phone usage?
> After a long day you come home to relax. The first thing you do is find your phone and start watching some youtube. Then check facebook, and then reading some news. Suddenly a hour has passed. What happened to all that time you think to yourself. Maybe we can create some program to help with this problem! What if we could help users manage their smart phone usage?

Its going to work like this: A user can add smartphone activities. Then he can see a status on how his smartphone usage is going.

Expand Down Expand Up @@ -245,7 +245,7 @@ Come up with one feature you think would be helpful for this program.
Optional

- Lets improve the `addActivity`, so that we don't need to specify the date, but the function automatically figures out what the date is. Check out this link: <https://stackoverflow.com/a/34015511>
- Improve the `showStatus` function by only showing the number of actitivies for that specific day.
- Improve the `showStatus` function by only showing the number of activities for that specific day.
- Create a function for calculating the activity a user has spent the most time on.

## Bonus assignment
Expand Down
Loading