Get help on our basic JavaScript and Algorithms Challenges. If you are posting code that is large use Gist - https://gist.github.com/ paste the link here.
thecodingaviator on master
remove A (#31157) (compare)
:star2: 2187 | @jluboff |http://www.freecodecamp.com/jluboff
[a-z\d]+$
More Regex help!! XD.
I am not sure why this matches the last test. It passes all the others. I thought the syntax {num1, num2} matched a range? Is it a bug? Here is my regex:
let ohStr = "Ohhh no";
let ohRegex = /h{3,6}/;
let result = ohRegex.test(ohStr);
\*Your regex should use curly brackets.
Your regex should not match "Ohh no"
Your regex should match "Ohhh no"
Your regex should match "Ohhhh no"
Your regex should match "Ohhhhh no"
Your regex should match "Ohhhhhh no"
Your regex should not match "Ohhhhhhh no"*/
parseInt
to change the number in string to a number... but i also return the "12345...."
string
console.log(file1).Split(");
lol thanks @Hijerboa
luccifer00 sends brownie points to @hijerboa :sparkles: :thumbsup: :sparkles:
function sumPrimes(num) {
var isPrime = true;
var counter = 1;
var sum = 0;
while(counter <= num){
if(counter >= 3){
for(i=3; i<=(counter/2); i+2){
if(Number.isInteger((counter/i))){
isPrime = false;
i = ((counter/2)+1);
} else {
isPrime = true;
}
}
} else if(counter >= 2){
isPrime = false;
}
if(isPrime){
sum += counter;
counter++;
}else{
counter++;
}
}
return sum;
}
if(counter >= 3)
part