Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,174,193 members, 7,891,005 topics. Date: Tuesday, 16 July 2024 at 06:20 AM |
Nairaland Forum / Tosineben2222's Profile / Tosineben2222's Posts
(1) (of 1 pages)
Webmasters / Re: Learn Web Design LIVE On Nairaland!!! by tosineben2222: 4:47pm On Jan 08, 2016 |
don't worry i have done It is strictly javascript |
Webmasters / Re: Learn Javascript Here!!!(updated) by tosineben2222: 11:55pm On Jan 07, 2016 |
this is what i did function fizzBuzz(){ for(var i=1;i<=100;i++){ if(15%5 === 0 && 15%3 === 0){ return('FizzBuzz'); } else if(63%3 === 0){ return('Fizz'); } else if(20%5 === 0){ return('Buzz'); }else if (101||3&&5){ return(101); } } } but dis is what i keep on getting Total Specs: 8 Total Failures: 5 1 . Fizz Buzz tests should return `Fizz` for number divisible by 3 Expected 'FizzBuzz' to be 'Fizz'. 2 . Fizz Buzz tests should return `Buzz` for number divisible by 5 Expected 'FizzBuzz' to be 'Buzz'. 3 . Fizz Buzz tests should return `Fizz` for 63 Expected 'FizzBuzz' to be 'Fizz'. 4 . Fizz Buzz tests should return 7 since its indivisible by 3 and 5 Expected 'FizzBuzz' to be 7. 5 . Fizz Buzz tests should return 101 since its indivisible by 3 and 5 Expected 'FizzBuzz' to be 101. pls help me |
Webmasters / Re: Learn Javascript Here!!!(updated) by tosineben2222: 11:52pm On Jan 07, 2016 |
then what should i do pls help am begging u |
Webmasters / Re: Learn Javascript Here!!!(updated) by tosineben2222: 5:22pm On Jan 07, 2016 |
please can any webmaster kindly give a solution to this java programming language Create a function fizzBuzz to return 'Fizz', 'Buzz', 'FizzBuzz', or the argument it receives, all depending on the argument of the function, a number that is divisible by, 3, 5, or both 3 and 5, respectively. with the test escribe("Fizz Buzz tests ", function() { it("should return `Fizz` for number divisible by 3", function() { expect(fizzBuzz(3)).toBe('Fizz'); }); it("should return `Buzz` for number divisible by 5", function() { expect(fizzBuzz(5)).toBe('Buzz'); }); it("should return `FizzBuzz` for 15", function() { expect(fizzBuzz(15)).toBe('FizzBuzz'); }); it("should return `FizzBuzz` for 45", function() { expect(fizzBuzz(45)).toBe('FizzBuzz'); }); it("should return `FizzBuzz` for 90", function() { expect(fizzBuzz(90)).toBe('FizzBuzz'); }); it("should return `Fizz` for 63", function() { expect(fizzBuzz(63)).toBe('Fizz'); }); it("should return 7 since its indivisible by 3 and 5", function() { expect(fizzBuzz(7)).toBe(7); }); it("should return 101 since its indivisible by 3 and 5", function() { expect(fizzBuzz(101)).toBe(101); }); }); EntclassBlog TeenWeb lalasticlala fp material cuz i need help |
Webmasters / Re: Learn Web Design LIVE On Nairaland!!! by tosineben2222: 5:06pm On Jan 07, 2016 |
please can any webmaster kindly give a solution to this java programming language Create a function fizzBuzz to return 'Fizz', 'Buzz', 'FizzBuzz', or the argument it receives, all depending on the argument of the function, a number that is divisible by, 3, 5, or both 3 and 5, respectively. with the test escribe("Fizz Buzz tests ", function() { it("should return `Fizz` for number divisible by 3", function() { expect(fizzBuzz(3)).toBe('Fizz'); }); it("should return `Buzz` for number divisible by 5", function() { expect(fizzBuzz(5)).toBe('Buzz'); }); it("should return `FizzBuzz` for 15", function() { expect(fizzBuzz(15)).toBe('FizzBuzz'); }); it("should return `FizzBuzz` for 45", function() { expect(fizzBuzz(45)).toBe('FizzBuzz'); }); it("should return `FizzBuzz` for 90", function() { expect(fizzBuzz(90)).toBe('FizzBuzz'); }); it("should return `Fizz` for 63", function() { expect(fizzBuzz(63)).toBe('Fizz'); }); it("should return 7 since its indivisible by 3 and 5", function() { expect(fizzBuzz(7)).toBe(7); }); it("should return 101 since its indivisible by 3 and 5", function() { expect(fizzBuzz(101)).toBe(101); }); }); |
(1) (of 1 pages)
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12 |