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
Post a Comment