Open danidls99 opened 5 years ago
have you copied and pasted your code in to a javascript checker ? Maybe you could find a website online that can check for any errors !
hi thanks for the rec!
I tried and it said this: Expected an identifier and instead saw '0'. function randomNumber(0,350) {
which is referring to this in my code (sorry i forgot to paste this in the post above):
function randomNumber(0,350) {
return Math.floor(Math.random() * (350 - 0 + 1)) + min;
}
I noticed that sublime highlights the closing parenthesis after the 350 in pink which I know means there is a problem. But I thought it would be 0 to 350 because I want my random variable to be for the hue which is specified by angle.
Hi Dani,
Regarding the function, you should keep min and max inside the function parentheses as the parameters and inside the function body as well (between the curly braces), and then call the function with the values you want to use: randomNumber(0, 350);
On Mon, Oct 29, 2018 at 8:52 PM danidls99 notifications@github.com wrote:
hi thanks for the rec!
I tried and it said this: Expected an identifier and instead saw '0'. function randomNumber(0,350) {
which is referring to this in my code (sorry i forgot to paste this in the post above):
function randomNumber(0,350) { return Math.floor(Math.random() * (350 - 0 + 1)) + min; }
I noticed that sublime highlights the closing parenthesis after the 350 in pink which I know means there is a problem. But I thought it would be 0 to 350 because I want my random variable to be for the hue which is specified by angle.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/orzubalsky/creative-computing-2018/issues/105#issuecomment-434133086, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-ntSKEIs4FknhO6sN3koRPcOeVNQf6ks5up6LNgaJpZM4YA7CO .
For whatever reason, nothing I have put in my javascript file has shown up on my page. Could someone take a look at it? Even if this is completely wrong, wouldn't I have seen at least some sort of change on my page? It has been the same since I initially copied and pasted the code into the verb 2 file.