get help in general - we have more specialized help rooms here: https://gitter.im/FreeCodeCamp/home
function fill (minSteps, maxSteps, stepSize, steps)
{
var arr = [];
var factor = (maxSteps - minSteps) / (steps - 1) ;
arr[0] = stepSize * minSteps;
arr[steps-1] = stepSize * maxSteps;
for (var i = 1 ; i < steps -1 ; i++ ) {
arr[i] = stepSize * Math.round(minSteps + i*factor);
}
return arr;
}
fill(1,10,50,10);
if (randomEndurancePattern[0] === "Pyramid 3") {
rounds = Math.floor(parseInt(totalDist.val()) / (6 * 25));
practiceSet = randomEndurancePattern[0] + "<br /> Rounds: " + rounds + "<br />";
} else if (randomEndurancePattern[0] === "Pyramid 4") {
rounds = Math.floor(parseInt(totalDist.val()) / (10 * 25));
practiceSet = randomEndurancePattern[0] + "<br /> Rounds: " + rounds + "<br />";
} else if (randomEndurancePattern[0] === "Pyramid 5") {
rounds = Math.floor(parseInt(totalDist.val()) / (15 * 25));
if (rounds<1) {
//
}
practiceSet = randomEndurancePattern[0] + "<br /> Rounds: " + rounds + "<br />";
}
endurancePatterns = [["Pyramid 3", 1, 2, 3],
["Pyramid 4", 1, 2, 3, 4],
["Pyramid 5", 1, 2, 3, 4, 5]]
function LongestWord(sen) {
//var re = "/([A-Z ])/ig";
//var found = sen.match(re);
var arr = sen.split(" "),
longest = arr[0];
for (i = 1; i>arr.length; i++) {
if (arr[i].length > longest.length)
{
longest = arr[i];
}
}
// code goes here
return longest;
}
function LongestWord(sen) {
var re = /[^a-z]\ig;
sen = sen.replace(re,'');
var re = /[^a-z\s0-9]/ig;
@media (max-width 500px) {
h1 {
font-size: 50px;
margin-top: 20px;
line-height: 40px;
}
}
@media (max-width 500px) {
h1 {
font-size: 50px;
margin-top: 20px;
line-height: 40px;
}
}
@media (max-width 500px) {
h1 {
font-size: 50px;
margin-top: 20px;
line-height: 40px;
}
}
(max-width: 500px)
var fs = require('fs');
var file = process.argv[2];
var count = 0;
fs.readFile(file, function(err, data) {
if (err) throw err;
data.toString().split('').forEach(function(x){
if (x == '\n')
count += 1;
});
});
-> 0
lineCount = str.split('\n').length-1;
function sumFibs(num) {
var number = 1, oddNum = 0;
var numray = [1,1];
for(i = 1; i < num; i++){
numray.push(numray[i]+numray[i-1]);
}
for(j = 0; j< num; j++){
if(numray[j] % 2 && numray[j] < num){
oddNum += numray[j];
}
}
return oddNum;
}
sumFibs(4);
[1,1]
if(numray[j] % 2 && numray[j] < num){
if(numray[j] % 2 && numray[j] < num){
to if(numray[j] % 2 && numray[j] <= num){