Issue 1:
Challenge Make Dead Links using the Hash Symbol has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. ">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Issue 2:
The test case of aaabb should have 120 total permutations (5! = 120). I followed Heap's algorithm as posted on wikipedia and calculated 120 permutations.

110 of the permutations are the following 9 strings which have same consecutive letters:

aaabb

aabab

aabba

abaab

abbaa

baaab

baaba

babaa

bbaaa

Removing all examples of these 9 permutations leaves 10 permutations that appear to pass the consecutive letters case as I read and interpret it it. Btw, I found these matches using the regular expression /(.)\1+/g;

However, the answer on the challenge page says that there are 12 permutations from this given test case. Which of the nine listed permutations count as valid answers?

This same issue affects the "abcdefa" and "abfdefa" strings.

// array that will hold the permutations
// it is emptied each time the permAlone function is called
var perms = [];

function permAlone(str) {
var strArr = str.split("");
//console.log(strArr);

// empty the answer array each time this function is called
perms = [];
permutator(strArr.length, strArr);
console.log(str + " - num perms: " + perms.length);
// console.log(perms.join(", "));
perms = removeDuplicates();
console.log(perms.length);
return perms.length;
}

/**
* removeDuplicates
* does a filter to remove array elments with consecutive duplicate characters "aa", "bbb", etc.
* @returns - array with duplicate elements removed
*/
function removeDuplicates() {
var removeCounter = 0;
var regEx = /(.)\1+/g;

var finalPerms = perms.filter(function (element, index, array) {
if (element.match(regEx)) {
console.log("removed: " + element);
removeCounter++;
return false;
}
else {
return true;
}
});
console.log("Removed: " + removeCounter);
return finalPerms;
}

/**
* permutator
*
* @param {any} arr - an array of characters to be permutated
* @return perms - an array of permutated strings
*/
function permutator(n, array) {

function swap(a, b) {
var temp = array[a];
array[a] = array[b];
array[b] = temp;
}

if (n === 1) {
perms.push(array.join(""));
//return array;
}
else {
for (var i = 0; i < n - 1; i++) {
permutator(n - 1, array);

if (i % 2 === 0) {
swap(i, n - 1);
}
else {
swap(0, n - 1);
}
}
// console.log(array.toString());
permutator(n - 1, array);
}
}