2
In the following code means the three dots that precede document.querySelectorAll
const [marcas, valor] = [...document.querySelectorAll('input.classNew')];
marcas.addEventListener('keyup', function() {
//codigo
}
I did numerous searches on the site and Google without success.
Note: I know that removing one or more dots gives error in the script
Related: What improvements will the Spread Operator implementation bring to javascript?
– Woss
@Andersoncarloswoss, thank you!!!!
– user60252
I affirmed the question and denied the two answers, I believe that voting as duplicate is the best action in this "good" question
– MarceloBoni
The main advantage is to be able to copy the array instead of passing the reference.
– Eduardo Vargas
@Marceloboni, after @ Andersoncarloswoss pointed out the links I was going to remove the question but the answers won’t let me remove.
– user60252
@Marceloboni it’s cool that you read "when to negative an answer" which clearly says that you should only negative when the answer is dangerously wrong. Attitudes such as that taken in this case demotivate to respond. Here you give an explanation of when you should vote against.
– Sorack
@Sorack the answer is not wrong, but end up taking the merit of the other answers (I may be wrong and may even be exaggerated), I believe that linking the other answers to this question and closing it as duplicate may be the best in this case (Again, it may be an exaggeration on my part)
– MarceloBoni
@Marceloboni yes, it is exaggeration and the wrong way to use the downvote, as you can read in what I Linkei. I will emphasize here "Use the votes against when you find a remarkably sloppy and sloppy publication or an answer that is clearly, and perhaps dangerously, incorrect". And also "Votes against should be reserved for extreme cases".
– Sorack
Downvote is a thing of super lazy genius. You know damn well, you find your question/answer incorrect but I do not present arguments. In my case, of this question, he must have felt that I had an obligation to know about this operator or maybe he didn’t see my difficulty
Fiz inúmeras buscas no site e no Google sem obter exito.
– user60252