

InterviewSolution
Saved Bookmarks
1. |
What is spread, default and rest parameter? |
Answer» <html><body><p><strong>Spread Operator</strong>- Donated by ‘...’ and is followed by the variable. The syntax of the spread operator would look like this for example:- ‘...X’. Spread operators manipulated objects and arrays which is the prime reason it is used in ES6. It is used for copying the property of one object to another.</p><p><strong>Default Operator</strong>- In order to initialize a function using default values, the default operator is deployed. The parameter’s <a href="https://interviewquestions.tuteehub.com/tag/value-238057" style="font-weight:bold;" target="_blank" title="Click to know more about VALUE">VALUE</a> can be anything- a number or a function or null.</p><p><strong>Rest Parameter</strong>- This operator is used for recovering all the arguments that are required to invoke a function. This allows <a href="https://interviewquestions.tuteehub.com/tag/us-243201" style="font-weight:bold;" target="_blank" title="Click to know more about US">US</a> to put items belonging to different <a href="https://interviewquestions.tuteehub.com/tag/categories-249167" style="font-weight:bold;" target="_blank" title="Click to know more about CATEGORIES">CATEGORIES</a> separate. The rest parameter allows combining the parameters in a common array parameter.</p> 12. What is Webpack ? <p>Webpack allows you to create a pile of the javascript files that are usable in the browser. With Webpack, we can <a href="https://interviewquestions.tuteehub.com/tag/build-403683" style="font-weight:bold;" target="_blank" title="Click to know more about BUILD">BUILD</a> the dependency graph, do application processing. With the dependency graph, one can map every module of the project. This helps in matching up with project requirements.</p></body></html> | |