Hi, I need some help coming up with an algorithm that will return class 1, 2, or 3 based on the year that is entered. I have an example that works but I need something a little more simple.
`function senateclass (cycle) {
return 3 - ((cycle % 6) % 3);
}`
for more info on the senate classes Click Here
Thank you very much for your help.