Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

How to complete my JavaScript coding homework

$
0
0

I am stuck on this assignment and I don't know what I'm doing wrong.

I did this which in my head should pass the question but according to the custom website we have to do it on the answer is wrong and I don't know what else to do.

//writes the parameters 1-10                                        var result = "";                                        function count(num1, num2)                                      {                                         for (var i = num1 + 1; i <= num2; i++)                                          {                                         result += i;                                            if (i < num2)                                           {                                             result += ",";                                            }                                         }                                       return result;                                        }                                       

I attempted this with the help of my friends and with chatgpt to assist me in what I could be doing wrong, however it doesn't really give the answer I was looking for.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>