Vanilla Javascript Counter Example Meaning Math Problem