Question: Hello i need help with this assignment - only thing you have to do is change Fizz,Buzz,FizzBuzz to numbers that's it. Any help is appreciated.
Hello i need help with this assignment - only thing you have to do is change Fizz,Buzz,FizzBuzz to numbers that's it. Any help is appreciated. You can use editplus or notepad++ for this. Need to use a validator to correct for errors: https://validator.w3.org/#validate_by_input
I repeat only thing you have to do is change Fizz,Buzz,FizzBuzz to numbers that's it. I need this done as soon as possible.
Code is below
| body { | |
| background-color:black; | |
| } | |
| h1 { | |
| color:black; | |
| } | |
| td { | |
| padding:2px; | |
| text-align:center; | |
| background-color:white; | |
| border-radius:4px; | |
| border: 1px solid white; | |
| } | |
| .Fizz { | |
| background-color:#0000FF; | |
| } | |
| .Buzz { | |
| background-color:#ffff00; | |
| } | |
| .FizzBuzz { | |
| background-color:#35530a; | |
| } | |
FizzBuzz Table | |
| (function(){ | |
| var START = 1,END = 100; | |
| var FizzBuzz = function(num){ | |
| if(num%15==0) return 'FizzBuzz'; | |
| if(num%5==0) return 'Buzz'; | |
| if(num%3==0) return 'Fizz'; | |
| return num; | |
| } | |
| var list = d3.range(START,END+1).map(FizzBuzz); | |
| var fbDataSet = []; | |
| for(var i=0; i < END; i+=10){ | |
| fbDataSet.push( list.slice(i, i+10) ); | |
| } | |
| var table = d3.select('body').append('table'); | |
| tr = table.selectAll('tr') | |
| .data(fbDataSet) | |
| .enter() | |
| .append('tr'); | |
| var td = tr.selectAll('td') | |
| .data(function(d){ return d }) | |
| .enter() | |
| .append('td') | |
| .attr({ | |
| class:function(d){ | |
| return (typeof d=='string') ? d : null; | |
| } | |
| }) | |
| .text(function(d){ return d } ); | |
| })(); | |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
