0 added
0 removed
Original
2026-01-01
Modified
2026-03-09
1
<p>Muffin is not happy this time! And it’s not about those 480 calories in his dinner (although it’s most likely the case).</p>
1
<p>Muffin is not happy this time! And it’s not about those 480 calories in his dinner (although it’s most likely the case).</p>
2
<p>The thing is that the program shows one number only, and the boss wants to see two: for lunch and for dinner. Preferably with text explanations.</p>
2
<p>The thing is that the program shows one number only, and the boss wants to see two: for lunch and for dinner. Preferably with text explanations.</p>
3
<p>Let’s work on our code. But first, let’s try to understand how the current version works.</p>
3
<p>Let’s work on our code. But first, let’s try to understand how the current version works.</p>
4
<p>JavaScript runs programs sequentially, command after command, and outputs the result of the latest executed command to the console. In the current version of our program, the last command returns 480. And that’s what we see in the console.</p>
4
<p>JavaScript runs programs sequentially, command after command, and outputs the result of the latest executed command to the console. In the current version of our program, the last command returns 480. And that’s what we see in the console.</p>
5
<p>In order to output additional information to the console, you can use a special command:</p>
5
<p>In order to output additional information to the console, you can use a special command:</p>
6
console.log(data for console output);<p>This command can be used anywhere in the program to output not just the results of command execution, but text tips as well. For example:</p>
6
console.log(data for console output);<p>This command can be used anywhere in the program to output not just the results of command execution, but text tips as well. For example:</p>
7
console.log(2 * 2);<p>Text tips, unlike operation results, must be enclosed in quotation marks:</p>
7
console.log(2 * 2);<p>Text tips, unlike operation results, must be enclosed in quotation marks:</p>
8
console.log('Muffin says hi!');<p>Let’s get to work!</p>
8
console.log('Muffin says hi!');<p>Let’s get to work!</p>