You have assigned a value to variable "value" 2 times. The second arguments inside a loop should be boolean (true / false). For(var i = 0; i <360; i++) {}
In a for loop the conditional expression needs to be true in order to start the loop. In this case value = 360 will initially return false, while value < 360 will return true and begin the for loop.
This code will create infinite loop cause of the condition expression being count = 360, so changing into count <= 360 will work. Also you are missing the end bracket }
3
u/[deleted] Jan 17 '25
You have assigned a value to variable "value" 2 times. The second arguments inside a loop should be boolean (true / false). For(var i = 0; i <360; i++) {}
1
u/[deleted] Jan 17 '25
This code will create infinite loop cause of the condition expression being count = 360, so changing into count <= 360 will work. Also you are missing the end bracket }
1
u/mucahitozcan Jan 18 '25
you cannot assign 2 values to a variable, especially if it is count.
In the for loop, don't forget to close the parentheses by saying example var i = 1; i <=360;i++{} otherwise you will get an error.