Skip to content

Commit

Permalink
Correct "expected output" mistake (#1000)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkangus authored and Schalk Neethling committed Jun 28, 2018
1 parent 77a093e commit 19639b4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions live-examples/js-examples/array/array-reverse.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<pre>
<code id="static-js">var array1 = ['one', 'two', 'three'];
var reversed = array1.reverse();
console.log('array1: ', array1);
// expected output: Array ['one', 'two', 'three']

console.log(array1);
var reversed = array1.reverse();
console.log('reversed: ', reversed);
// expected output: Array ['three', 'two', 'one']

console.log(reversed);
/* Careful: reverse is destructive. It also changes
the original array */
console.log('array1: ', array1);
// expected output: Array ['three', 'two', 'one']
</code>
</pre>

0 comments on commit 19639b4

Please sign in to comment.