Posts by Fernando Farias • 86 points
3 posts
-
3
votes3
answers88
viewsA: Insert non-existent months into the array
You can create one by running from 1 to 12, and check if the iteration number already exists in your nameVendaArray, if not you populate with {i: 0}. Or You can use a utility like lodash and merge…
-
0
votes1
answer111
viewsA: Media querie is ignoring attributes
CSS has top-down reading behavior, applying the rule you find last. Usually when we use media queries, they end up using the same selectors that we used previously to define some "generic" patternso…
-
4
votes2
answers635
viewsA: Why is this code not calculating the average correctly?
The problem is on the line: resultado = valor1 + valor2 / 2; It turns out that the division and multiplication operation always has priority over addition and subtraction, if you want to specify…