diff --git a/exercises/concept/lasagna/.docs/instructions.md b/exercises/concept/lasagna/.docs/instructions.md index 393e38c1b..ee39b4c13 100644 --- a/exercises/concept/lasagna/.docs/instructions.md +++ b/exercises/concept/lasagna/.docs/instructions.md @@ -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 ``` @@ -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 ``` @@ -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 ``` diff --git a/exercises/concept/lasagna/.docs/introduction.md b/exercises/concept/lasagna/.docs/introduction.md index 2d9cbf349..7679aaba9 100644 --- a/exercises/concept/lasagna/.docs/introduction.md +++ b/exercises/concept/lasagna/.docs/introduction.md @@ -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. ``` @@ -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 ``` @@ -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 ```