Answers for "The missing value javascript"

0

The missing value javascript

var a = [5],
  count = 5;
var missing = new Array();

for (var i = 1; i <= count; i++) {
  if (a.indexOf(i) == -1) {
    missing.push(i);
  }
}
console.log(missing); // to check the result.
Posted by: Guest on September-28-2020

Code answers related to "The missing value javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language