FSD-Theory Assingment 2:Advanced ES6 features in JavaScript and Typescript

 

                        Assignment -2

Advanced ES6 features in JavaScript and Typescript

 

 

Q. 1 Answer the following.

1.      What are template literals?

2.     What is the purpose of the spread syntax in JavaScript?

3.     What are arrow functions in ES6?

4.     What are Symbols in JavaScript?

5.     List three advantages of using Typescript over plain JavaScript.

6.     What are decorators in TypeScript?

7.      What are 'let' and 'const' in ES6?

Q.2 Answer the following.

1.      Explain the difference between let and const in JavaScript.

2.     What are arrow functions in ES6, and how do they differ from regular functions?

3.     Demonstrate the destructuring assignment for an object and an array.

4.     Explain the role of iterators and generators in JavaScript.

5.     Define what pure functions are and why they are important in functional programming.

6.     Explain how async and await simplify asynchronous code in JavaScript.

7.     Explain object oriented programming in ES6.

8.     Discuss decorators in TypeScript and types of decorators.

9.     What is type narrowing, and how does it work in TypeScript?

10. Explain the purpose of type guards in TypeScript.

11.  What are symbols in ES6, and how are they used? Explain with an example.

12.  Explain what TypeScript is with Static Typing feature with example?

13.  Explain how modules work in TypeScript. Provide an example of importing and exporting modules using ES6.


Comments

Popular posts from this blog

Slip 11: Write node js application that transfer a file as an attachment on web and enables browser to prompt the user to download file using express js.

Slip 7 Create a node js file named main.js for event-driven application. There should be a main loop that listens for events, and then triggers a callback function when one of those events is detected.

Slip 1(a) Write an Angular 13 application addition of two numbers using ng-init, ng-model & ng-bind. And also demonstrate ng-show, ng-disabled, ng-click directives on button component.