Posts by Gustavo Rodrigues • 39 points
9 posts
-
-4
votes1
answer58
viewsA: Why Nan’s reduce return?
The Return inside the IF will only work in the last element. All the above will be Undefined. Leaving Undefined + the last value = NAN. And in the last iteration it will enter if and return…
javascriptanswered Gustavo Rodrigues 39 -
-2
votes1
answer58
viewsQ: Why Nan’s reduce return?
I commented on Re-turn sum, on purpose, because I didn’t understand. If I remove Return sum, it returns the right average, I do not understand when it enters the if in the last position this return…
javascriptasked Gustavo Rodrigues 39 -
0
votes1
answer128
viewsQ: How to use v-for with components, using array?
I’m using the question below to better illustrate my question. Vue is not rendering table with v-for, how to solve? How do I do the same thing? Only by displaying a listing, using a component, but…
-
1
votes1
answer47
viewsQ: How do I create an element with Vue JS?
I made this very basic structure, a component with input, I wanted to click a button and generate one more in html. I try to search with appendchild or v-for or even v-html, but I’m not getting. let…
-
-2
votes3
answers63
viewsA: Vue JS - How to display a list interspersed between property and value?
I ended up doing this way to be able to separate visually and to be able to make an edition. <table> <tr> <td v-for="(value, name, index) in lista"> <div…
-
2
votes3
answers63
viewsQ: Vue JS - How to display a list interspersed between property and value?
I have this list as an object: let app = new Vue({ el:'#app', data:{ lista:{ nome: 'Nome Completo', email: '[email protected]', cpf: 'xxx.xxx.xxx-xx', rg: 'x.xxx.xxx', tel: '(xx) x xxxx-xxxx' } } });…
-
-3
votes4
answers7619
viewsA: Remove Focus/Outline from input (CSS)
Put the property Outline as None. In normal css it would look: input:focus{ outline: none; }
-
1
votes2
answers716
viewsA: Dynamic ID with Jquery
The easiest way I see it is: var x = 0; $('O QUE VOCE ESCOLHER').click(function(){ x++; $("#lista").append(`<span id='span${x}'><br> ${label} - R$ ${valor} "</span>` ); }); Instead…
-
0
votes1
answer105
viewsQ: Creating an object with a random internal datum (Random)
I am trying to create an object called "State", however I would like the DDD of each object, when creating, to be generated randomly. class Estado { public int Resultado { get; set; } public string…