Skip to content

Commit

Permalink
Format files
Browse files Browse the repository at this point in the history
  • Loading branch information
SleeplessByte committed Jul 31, 2024
1 parent 89951f3 commit 7f8411f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions exercises/concept/lasagna/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Define the `EXPECTED_MINUTES_IN_OVEN` constant that represents how many minutes
Implement the `remainingMinutesInOven` function that takes the actual minutes the lasagna has been in the oven as a _parameter_ and _returns_ how many minutes the lasagna still has to remain in the oven, based on the **expected oven time in minutes** from the previous task.

```javascript
remainingMinutesInOven(30);
remainingMinutesInOven(30)
// => 10
```

Expand All @@ -24,7 +24,7 @@ remainingMinutesInOven(30);
Implement the `preparationTimeInMinutes` function that takes the number of layers you added to the lasagna as a _parameter_ and _returns_ how many minutes you spent preparing the lasagna, assuming each layer takes you 2 minutes to prepare.

```javascript
preparationTimeInMinutes(2);
preparationTimeInMinutes(2)
// => 4
```

Expand All @@ -33,6 +33,6 @@ preparationTimeInMinutes(2);
Implement the `totalTimeInMinutes` function that takes _two parameters_: the `numberOfLayers` parameter is the number of layers you added to the lasagna, and the `actualMinutesInOven` parameter is the number of minutes the lasagna has been in the oven. The function should _return_ how many minutes in total you've worked on cooking the lasagna, which is the sum of the preparation time in minutes, and the time in minutes the lasagna has spent in the oven at the moment.

```javascript
totalTimeInMinutes(3, 20);
totalTimeInMinutes(3, 20)
// => 26
```
22 changes: 11 additions & 11 deletions exercises/concept/lasagna/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ Variables in JavaScript can be defined using the [`const`][mdn-const], [`let`][m
A variable can reference different values over its lifetime when using `let` or `var`. For example, `myFirstVariable` can be defined and redefined many times using the assignment operator `=`:

```javascript
let myFirstVariable = 1;
myFirstVariable = 'Some string';
myFirstVariable = new SomeComplexClass();
let myFirstVariable = 1
myFirstVariable = 'Some string'
myFirstVariable = new SomeComplexClass()
```

In contrast to `let` and `var`, variables that are defined with `const` can only be assigned once. This is used to define constants in JavaScript.

```javascript
const MY_FIRST_CONSTANT = 10;
const MY_FIRST_CONSTANT = 10

// Can not be re-assigned.
MY_FIRST_CONSTANT = 20;
MY_FIRST_CONSTANT = 20
// => TypeError: Assignment to constant variable.
```

Expand All @@ -34,10 +34,10 @@ In JavaScript, units of functionality are encapsulated in _functions_, usually g

```javascript
function add(num1, num2) {
return num1 + num2;
return num1 + num2
}

add(1, 3);
add(1, 3)
// => 4
```

Expand All @@ -49,16 +49,16 @@ To make a `function`, a constant, or a variable available in _other files_, they

```javascript
// file.js
export const MY_VALUE = 10;
export const MY_VALUE = 10

export function add(num1, num2) {
return num1 + num2;
return num1 + num2
}

// file.spec.js
import { MY_VALUE, add } from './file';
import { MY_VALUE, add } from './file'

add(MY_VALUE, 5);
add(MY_VALUE, 5)
// => 15
```

Expand Down

0 comments on commit 7f8411f

Please sign in to comment.