What does while (i --> 0) mean?

前端 未结 4 601
不思量自难忘°
不思量自难忘° 2020-12-17 02:29

I apologize if this a stupid question, but I cannot find the answer anywhere.

How does the following code work? (I realize that it loops over the elements of e

4条回答
  •  青春惊慌失措
    2020-12-17 03:17

    The code should actually be:

    while (i-- > 0) {
    

    where the loop will run if the value after the variable i has been decremented is greater than zero.

提交回复
热议问题