Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
Code
Diff
  • function fizzbuzzy(n) {
      var cones = 1;
      for (let i = 0; i < n; i+=3,cones++);
      for (let i = 0; i < n; i+=5,cones++);
      return cones;
    }
    
  • 11
    function fizzbuzzy(n) {
    
    22
      var cones = 1;
    
    3
      for (i = 0; i < n; i++){
    
    4
        if (i % 5 === 0) cones++;
    
    5
        if (i % 3 === 0) cones++;       
    
    6
      }
    
    3+
      for (let i = 0; i < n; i+=3,cones++);
    
    4+
      for (let i = 0; i < n; i+=5,cones++);
    
    77
      return cones;
    
    88
    }