Skip to content

Commit cf2c4a9

Browse files
committed
Minor formatting, cleanup
1 parent aca39e6 commit cf2c4a9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/core/reference.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
/**
88
* Creates and names a new variable. A variable is a container for a value.
9+
*
910
* Variables that are declared with <a href="#/p5/let">let</a> will have block-scope.
1011
* This means that the variable only exists within the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/block">
1112
* block</a> that it is created within.
@@ -31,6 +32,7 @@
3132
* Creates and names a new constant. Like a variable created with <a href="#/p5/let">let</a>, a constant
3233
* that is created with <a href="#/p5/const">const</a> is a container for a value,
3334
* however constants cannot be changed once they are declared.
35+
*
3436
* Constants have block-scope. This means that the constant only exists within
3537
* the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/block">
3638
* block</a> that it is created within. A constant cannot be redeclared within a scope in which it
@@ -163,8 +165,9 @@
163165

164166
/**
165167
* The <a href="#/p5/if-else">if-else</a> statement helps control the flow of your code.
166-
* A condition is placed between the parenthesis following 'if'.
167-
* When that condition evalues to <a href="https://developer.mozilla.org/en-US/docs/Glossary/truthy">truthy</a>,
168+
*
169+
* A condition is placed between the parenthesis following 'if',
170+
* when that condition evalues to <a href="https://developer.mozilla.org/en-US/docs/Glossary/truthy">truthy</a>,
168171
* the code between the following curly braces is run.
169172
* Alternatively, when the condition evaluates to <a href="https://developer.mozilla.org/en-US/docs/Glossary/Falsy">falsy</a>,
170173
* the code between the curly braces that follow 'else' is run instead.
@@ -194,6 +197,7 @@
194197
/**
195198
* Creates and names a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions">function</a>.
196199
* A <a href="#/p5/function">function</a> is a set of statements that perform a task.
200+
*
197201
* Optionally, functions can have parameters. <a href="https://developer.mozilla.org/en-US/docs/Glossary/Parameter">Parameters</a>
198202
* are variables that are scoped to the function, that can be assigned a value when calling the function.
199203
*
@@ -378,9 +382,9 @@
378382
/**
379383
* <a href="#/p5/while">while</a> creates a loop that is useful for executing one section of code multiple times.
380384
*
381-
* With a 'while loop', the code inside of the loop body (in between the curly braces) is run repeatedly until the test condition
385+
* With a 'while loop', the code inside of the loop body (between the curly braces) is run repeatedly until the test condition
382386
* (inside of the parenthesis) evaluates to false. Unlike a <a href="#/p5/for">for</a> loop, the condition is tested before executing the code body with <a href="#/p5/while">while</a>,
383-
* so if the condition is initially false the loop body, or statement will never execute.
387+
* so if the condition is initially false the loop body, or statement, will never execute.
384388
*
385389
* As with any loop, it is important to ensure that the loop can 'exit', or that
386390
* the test condition will eventually evaluate to false. This is to keep your loop from trying to run an infinite amount of times,

0 commit comments

Comments
 (0)