Ad

Ha doesn't really work but yeah

Code
Diff
  • function fizzbuzzy(n) {
      var cones = 1;
      for (i = 0; i < n; i++){
    		!(i % 5) && cones++;
        !(i % 3) && cones++;       
      }
      return cones;
    }
    
    • function fizzbuzzy(n) {
    • var cones = 1;
    • for (i = 0; i < n; i++){
    • if (i % 5 === 0) cones++;
    • if (i % 3 === 0) cones++;
    • !(i % 5) && cones++;
    • !(i % 3) && cones++;
    • }
    • return cones;
    • }
Code
Diff
  • function fizzbuzzy(n) {
      var cones = 1;
      for (i = 0; i < n; i++){
        if (i % 5 === 0) cones++;
        if (i % 3 === 0) cones++;       
      }
      return cones;
    }
    
    • function fizzbuzzy(n) {
    • var cones = 1;
    • for (i = 0; i < n; i++){
    • if (i % 3 === 0 && i % 5 === 0){
    • cones += 2;
    • } else if (i % 5 === 0){
    • cones++;
    • } else if (i % 3 === 0){
    • cones++;
    • }
    • if (i % 5 === 0) cones++;
    • if (i % 3 === 0) cones++;
    • }
    • return cones;
    • }