Minds
It is Recommended to practice while you learn

Rest Parameter

The rest parameter syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent variadic functions in JavaScript. A function definition's last parameter can be prefixed with ... (three U+002E FULL STOP characters), which will cause all remaining (user supplied) parameters to be placed within an Array object.

syntax :
function f1(a, b, ...theArgs) {
// …
}

Example :
function myFun(a, b, ...manyMoreArgs ) {
console.log("a", a);
console.log("b", b);
console.log("manyMoreArgs", manyMoreArgs);
}

myFun("one", "two", "three", "four", "five", "six");

// Console Output:
// a, one
// b, two
// manyMoreArgs, ["three", "four", "five", "six"]

New Operator

The new operator lets developers create an instance of a user-defined object type or of one of the built-in object types that has a constructor function.

syntax :
new constructorFunction(arguments)

Example 1 :
let person = new Object();
person.name = "prashuk";
console.log(person);

Example 2 :
var person = function (firstName , CourceCount) {
this.firstName = firstName;
this.CourceCount = CourceCount;
};

var Anurag = new person("anurag" , 7)
var prashuk = new person("prashuk" , 2)

console.log(person);

This Operator

"This" keyword refers to an object that is executing the current piece of code. It references the object that is executing the current function. If the function being referenced is a regular function, “this” references the global object. If the function that is being referenced is a method in an object, “this” references the object itself.

syntax :
this

Example 1 :
const test = {
prop: 42,
func: function() {
return this .prop;
},
};

console.log(test.func());
// Expected output: 42

every Meathod

The every() method executes a function for each array element. The every() method returns true if the function returns true for all elements. The every() method returns false if the function returns false for one element. The every() method does not execute the function for empty elements. The every() method does not change the original array

syntax :
array.every (function(currentValue, index, arr), thisValue)

Example :
const ages = [32, 33, 16, 40];
ages.every (checkAge)
function checkAge(age) {
return age > 18;
}