Java-Script Rest and Spread Operators: In JavaScript, we are using three dots ( ... ) for both REST and SPREAD Operators. But these two operators are not the same they both have a different purpose. REST Operator - Purpose of this operator is to collect all remaining elements into the array. - For Example: - let take one array in below example - O/P : Necklace [ 'Earring', 'Payal', 'Brooch', 'Bangles'] - In the Above example three-dot contain the rest of the product time in the restProdcut variable that calls Destructuring that breaks our code into small pieces. - so in the above example, mainProduct variable contains my Main product and restProduct varibale contains my rest products. - The rest operator always gives rest data into array format only. - while creating function we can also use rest operator like below SPREAD Operator: - It's work opposite to rest operators, like in rest operator we are collecting item
Welcome to "TechoSwag" in this website you will get details understanding of "Angular" all versions like "Angular 2,4,5,6,7,8,9,10,11,12" and the basic concept of "JavaScrips" and the latest "ES6" features like "Arrow Funtions", "REST Operator", "SPRED Operators", etc.... In future will cover "ReactJS", "NODEJS", "HTML/CSS", "BOOTSTRAP"