2
I am trying to remove a position from the array with Slice, so I can only take it with the position of this array, could I take it for value? Because the position of the array changes a lot in each situation, I’m trying this way:
if($j('#folog_manha').css('display') == "none"){
var retornox = retorno.slice('Manhã');
}
If there is no way, how would I take the positions of this array to compare? in case I take the position that is 'Morning' and give it a chance.
I asked the question I would like to take for the value of it, not for the position as it changes dynamically depending on the situation, Morning can be 1, 2, 3, 4 etc..
– Gustavo Souza
but young he’s taking it for the item. in case there moves to 4 he takes the 4
– Julio Henrique
That would be his key, I’d have to know his position, so I’d have to file a request for each situation, the value would be simpler because it never changes.
(2) ["Comercial", "Manhã"]
0
:
"Comercial"
1
:
"Manhã"
length
:
2
__proto__
:
Array(0)
– Gustavo Souza
Now that I saw that it is another function, I thought it was the Slice, because I tried to pass the value and it didn’t work, I can test yours, but the 13dev already worked for me
– Gustavo Souza
yes @Gustavosouza no problem. although I answered first, and did in jquery that was what tagged in the tag.
– Julio Henrique
Yes, but his was more practical, with splice I can remove directly from the original array, so I can do several checks without putting in supporting variables, because I will have to do some 6 checks of this.
– Gustavo Souza