-
Set checkbox dynamically $('.myCheckbox').prop('checked', true);
-
Use of for and forEach for is used as a simple for loop
.forEach are methods that primarily iterate over arrays
[].forEach((val, index)=>{ ... });
-
JS map The map() method creates a new array with the results of calling a provided function on every element in the calling array. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map