0
I have a question in a code:
I got these two arrays:
var listaLeituras= [12,13,14,15,16,17,18];<br>
var leiturasRealizadas = [12,15,18];
In the end, I needed a code to show in a third array the unrealized readings, which would be the numbers 13,14,16,17. I tried the code below, but without success,:
var leiturasIgnoradas = listaLeituras.filter(function(leitura) {<br>
return leiturasRealizadas.indexOf(leitura) < 0;<br>
});
NOTE: My application is based on pure Javascript and cannot use external libraries.
Your code is correct... (https://jsfiddle.net/9kjz7b16/) What’s the problem?
– Sergio