Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
A script that takes information from prompts; not builded into HTML page/
  • Loading branch information
alisa-rogers authored Apr 16, 2020
0 parents commit 25a92aa
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions complexity.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function complexity () {
let strings = [];
strings.push (prompt("Type here:"));
for (let m = 0; m < strings.length; m++) {
let current = strings[m];
if (current.indexOf("complexety") === -1) {
alert ("Correct!")
}
else {
const check = strings[m].split (" ");
if (check.includes("complexety")) {
alert ("Error! Correct: complexity.");
}
else {
alert ("Correct!")
};
};
};
};
</script>

0 comments on commit 25a92aa

Please sign in to comment.