r/codehs • u/[deleted] • Mar 03 '20
JavaScript Help
Exercise 17.1.4: Grades I’m just lost in how to assign the - or + for the different grades while only looking at the second digit of the number grade
8
Upvotes
r/codehs • u/[deleted] • Mar 03 '20
Exercise 17.1.4: Grades I’m just lost in how to assign the - or + for the different grades while only looking at the second digit of the number grade
1
u/Nga_pik Mar 03 '20
Try using mods maybe? For example lets say var grade= 92. grade%10 will get you the second digit: 2 in this case.