Merge pull request #6311 from alistermada/fix/inconsistent-font-size
Fixes inconsistent font sizes in challenge description
This commit is contained in:
@ -33,4 +33,7 @@
|
|||||||
content: " \f08e";
|
content: " \f08e";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bonfire-instructions ol {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -4065,7 +4065,9 @@
|
|||||||
"id": "cf1111c1c12feddfaeb1bdef",
|
"id": "cf1111c1c12feddfaeb1bdef",
|
||||||
"title": "Generate Random Whole Numbers with JavaScript",
|
"title": "Generate Random Whole Numbers with JavaScript",
|
||||||
"description": [
|
"description": [
|
||||||
"It's great that we can generate random decimal numbers, but it's even more useful if we use it to generate random whole numbers.<ol><li>Use <code>Math.random()</code> to generate a random decimal.</li><li>Multiply that random decimal by <code>20</code>.</li><li>Use another function, <code>Math.floor()</code> to round the number down to its nearest whole number.</li></ol>Remember that <code>Math.random()</code> can never quite return a <code>1</code> and, because we're rounding down, it's impossible to actually get <code>20</code>. This technique will gives us a whole number between <code>0</code> and <code>19</code>.",
|
"It's great that we can generate random decimal numbers, but it's even more useful if we use it to generate random whole numbers.",
|
||||||
|
"<ol><li>Use <code>Math.random()</code> to generate a random decimal.</li><li>Multiply that random decimal by <code>20</code>.</li><li>Use another function, <code>Math.floor()</code> to round the number down to its nearest whole number.</li></ol>",
|
||||||
|
"Remember that <code>Math.random()</code> can never quite return a <code>1</code> and, because we're rounding down, it's impossible to actually get <code>20</code>. This technique will gives us a whole number between <code>0</code> and <code>19</code>.",
|
||||||
"Putting everything together, this is what our code looks like:",
|
"Putting everything together, this is what our code looks like:",
|
||||||
"<code>Math.floor(Math.random() * 20);</code>",
|
"<code>Math.floor(Math.random() * 20);</code>",
|
||||||
"We are calling <code>Math.random()</code>, multiplying the result by 20, then passing the value to <code>Math.floor()</code> function to round the value down to the nearest whole number.",
|
"We are calling <code>Math.random()</code>, multiplying the result by 20, then passing the value to <code>Math.floor()</code> function to round the value down to the nearest whole number.",
|
||||||
|
Reference in New Issue
Block a user