Computer Science, asked by creamiepie, 1 year ago

✴heya friend✋✋
✴plz help me in these question⬇⬇
✴Content quality answer required :)
✴No spamming please

❇Write a JavaScript code to print all the odd numbers from 15 backwards to 3.


mavas247: please mark me as brainliest
mavas247: plz
mavas247: thanks again
mavas247: hi

Answers

Answered by Anonymous
2

Hi,

for (var i = 15; i >= 3; i--) {

if (i%2 !== 0) {

document.write(i + "<br>");

}

}


let me know if you need explanation...


Answered by HeartHacker011
0

Explanation:

<script type=”text/javascript”>

function printOddNumbers(){

var counter;

for(counter=15;counter<=15;counter=counter-1)

{

if(counter%2!=0)

{

document.write(counter+”<br/>”);

}

may be its help u

}

}

printOddNumbers();

</script>

Similar questions