samedi 26 avril 2014

J-Query Console Error


Vote count:

0




I am having some issue with the code below. Console tells me that line 27 is not working..not sure why. This code is supposed to be a simple fizzbuzz if statement that for some reason is not working correctly. Could you advise?



$(document).ready(function()


function get_Value (i){
if (i % 3 === 0 & i % 5 ===0)
{
return "FizzBuzz";
}
else if (i % 3 === 0)
{
return "Fizz";
}
else if (i % 5 === 0)
{
return "Buzz";
}
else
{
return i;
}
}
}
$('#getNumber').click(function() {
var numInput = $('#numInput').val();
var value = get_Value(numInput);
$('.Buzz ul').append('<li>' + value + '</li>');
numInput.val('').focus();

});



});


asked 57 secs ago






Aucun commentaire:

Enregistrer un commentaire