• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Substract value with previus value

Resolved: Substract value with previus value

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I am making app in vue.js and right now I have a little problem
so my total should be Confirmed[i] – Confirmed[i-1] ๐Ÿ™‚

Answer:

If you change the forEach to
You can access the previous item like so
?.Confirmed || 0 is purely for index 0, when there is no previous item


If you have better answer, please add a comment about this, thank you!

arrays javascript vue.js
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: PyCharm cannot see my newly compiled .pyc see on import

27/03/2023

Resolved: I am facing ERR_HTTP2_PROTOCOL_ERROR on my website

27/03/2023

Resolved: TypeScript does not recognize properties when instantiating interface array

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.