Author | Message |
---|---|
jingchao
Posts: 25
|
Posted 20:55 Nov 19, 2019 |
in the sample code attendance.html, i didn't understand what this line of code does; ( count > 0 ? count : "" );
<script> |
RosaRock
Posts: 2
|
Posted 21:06 Nov 19, 2019 |
its a conditional operator so if the condition (count >0) is true then use count otherwise use "" https://www.geeksforgeeks.org/ternary-operator-question-mark-and-colon-in-javascript/ |
jingchao
Posts: 25
|
Posted 21:11 Nov 19, 2019 |
|