```js
-function IBeforeExceptC (word) {
+function IBeforeExceptC(word) {
// Good luck!
}
```
@@ -66,7 +72,7 @@ function IBeforeExceptC (word) {
```js
-function IBeforeExceptC (word)
+function IBeforeExceptC(word)
{
if(word.indexOf("c")==-1 && word.indexOf("ie")!=-1)
return true;
diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/iban.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/iban.english.md
index 9c27c0629c..76c449f81c 100644
--- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/iban.english.md
+++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/iban.english.md
@@ -6,20 +6,19 @@ challengeType: 5
## Description
```js
-function isValid (iban) {
+function isValid(iban) {
// Good luck!
}
```
@@ -66,7 +65,7 @@ function isValid (iban) {
```js
-function isValid (iban) {
+function isValid(iban) {
var ibanLen = {
NO:15, BE:16, DK:18, FI:18, FO:18, GL:18, NL:18, MK:19,
SI:19, AT:20, BA:20, EE:20, KZ:20, LT:20, LU:20, CR:21,
diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/identity-matrix.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/identity-matrix.english.md
index 1f2b0bf2cd..c5df19bf07 100644
--- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/identity-matrix.english.md
+++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/identity-matrix.english.md
@@ -6,16 +6,15 @@ challengeType: 5
## Description
-An identity matrix is a square matrix of size \( n \times n \),
-where the diagonal elements are all 1s (ones),
-and all the other elements are all 0s (zeroes).
-\begin{bmatrix} 1 & 0 & 0 \cr 0 & 1 & 0 \cr 0 & 0 & 1 \cr \end{bmatrix}
-Write a function that takes a number 'n' as a parameter and returns the identity matrix of order n x n.
+An identity matrix is a square matrix of size \( n \times n \), where the diagonal elements are all 1s (ones), and all the other elements are all 0s (zeroes).
+
+ - \(\displaystyle I_{n}=\begin{bmatrix} 1 & 0 & 0 \cr 0 & 1 & 0 \cr 0 & 0 & 1 \cr \end{bmatrix}\)
+
## Instructions
-
+Write a function that takes a number n
as a parameter and returns the identity matrix of order \( n \times n \).
## Tests
@@ -27,14 +26,14 @@ tests:
testString: assert(typeof idMatrix=='function','
idMatrix
should be a function.');
- text:
idMatrix(1)
should return an array.
testString: assert(Array.isArray(idMatrix(1)),'
idMatrix(1)
should return an array.');
- - text:
idMatrix(1)
should return
'+JSON.stringify(results[0])+'
.
- testString: assert.deepEqual(idMatrix(1),results[0],'
idMatrix(1)
should return
'+JSON.stringify(results[0])+'
.');
- - text:
idMatrix(2)
should return
'+JSON.stringify(results[1])+'
.
- testString: assert.deepEqual(idMatrix(2),results[1],'
idMatrix(2)
should return
'+JSON.stringify(results[1])+'
.');
- - text:
idMatrix(3)
should return
'+JSON.stringify(results[2])+'
.
- testString: assert.deepEqual(idMatrix(3),results[2],'
idMatrix(3)
should return
'+JSON.stringify(results[2])+'
.');
- - text:
idMatrix(4)
should return
'+JSON.stringify(results[3])+'
.
- testString: assert.deepEqual(idMatrix(4),results[3],'
idMatrix(4)
should return
'+JSON.stringify(results[3])+'
.');
+ - text:
idMatrix(1)
should return
[ [ 1 ] ]
.
+ testString: assert.deepEqual(idMatrix(1),results[0]);
+ - text:
idMatrix(2)
should return
[ [ 1, 0 ], [ 0, 1 ] ]
.
+ testString: assert.deepEqual(idMatrix(2),results[1]);
+ - text:
idMatrix(3)
should return
[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ]
.
+ testString: assert.deepEqual(idMatrix(3),results[2]);
+ - text:
idMatrix(4)
should return
[ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ]
.
+ testString: assert.deepEqual(idMatrix(4),results[3]);
```
@@ -46,7 +45,7 @@ tests:
```js
-function idMatrix (n) {
+function idMatrix(n) {
// Good luck!
}
```
@@ -73,7 +72,7 @@ let results=[[ [ 1 ] ],
```js
-function idMatrix (n) {
+function idMatrix(n) {
return Array.apply(null, new Array(n)).map(function (x, i, xs) {
return xs.map(function (_, k) {
return i === k ? 1 : 0;
diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/iterated-digits-squaring.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/iterated-digits-squaring.english.md
index b8fa1c578b..bdd98b6746 100644
--- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/iterated-digits-squaring.english.md
+++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/iterated-digits-squaring.english.md
@@ -7,14 +7,15 @@ challengeType: 5
## Description
If you add the square of the digits of a Natural number (an integer bigger than zero), you always end with either 1 or 89:
-15 -> 26 -> 40 -> 16 -> 37 -> 58 -> 89
-7 -> 49 -> 97 -> 130 -> 10 -> 1
-Write a function that takes a number as a parameter and returns 1 or 89 after performing the mentioned process.
+
+15 -> 26 -> 40 -> 16 -> 37 -> 58 -> 89
+7 -> 49 -> 97 -> 130 -> 10 -> 1
+
## Instructions
-
+Write a function that takes a number as a parameter and returns 1 or 89 after performing the mentioned process.
## Tests
@@ -49,7 +50,7 @@ tests:
```js
-function iteratedSquare (n) {
+function iteratedSquare(n) {
// Good luck!
}
```
@@ -65,7 +66,7 @@ function iteratedSquare (n) {
```js
-function iteratedSquare (n) {
+function iteratedSquare(n) {
var total;
while (n != 89 && n != 1) {
total = 0;