Calculate the sum of all the numbers in the array.
Calculate the average of all the numbers in the array.
Find the maximum number in the array.
Find the minimum number in the array.
2/05/2024
Use The below enum and write a code for checking each number is even or odd
enum Even {
One = 1,
Two = 2,
Three = 3,
Four = 4,
}
6/05/2024
-Design an portfolio website using html,css,js
-Design an indian flag using html,css
Class Program Question:
Create a TypeScript class called Rectangle that represents a rectangle. The class should have:
Private properties width and height.
A constructor that initializes width and height.
Public methods calculateArea() and calculatePerimeter() to compute the area and perimeter of the rectangle respectively.
Display the area and perimeter of a rectangle with width 5 and height 3.
Module Program Question:
Create a TypeScript module that contains a function findMax which finds the maximum element in an array of numbers. findMin which finds the minimum element in an array of numbers.Then, import this module into another TypeScript file and use the findMax function to find the maximum and minimum number in an array [1, 5, 3, 9, 2]. Print the result.
8/5/2024
1.declare a genrics for taking an array and process the even numbers into one array and odd numbers into anthor array
9/05/2024
1.Can you give me a example for single, multiple multilevel inheritance
1.Identity Function:
Write a generic function called identity that takes an argument and returns it without modification. The function should work with any type.
2.First Element of an Array:
Create a generic function called firstElement that takes an array as input and returns the first element of that array. Ensure the function works with arrays of any type.
14/05/2024
1.use the https://randomuser.me/api api and show the information in a detailed manner
2.Write a function for removing the duplicates in a typescript array
02/05/2024
2/05/2024
Use The below enum and write a code for checking each number is even or odd enum Even { One = 1, Two = 2, Three = 3, Four = 4, }
6/05/2024
-Design an portfolio website using html,css,js -Design an indian flag using html,css
Create a TypeScript class called
Rectangle
that represents a rectangle. The class should have:width
andheight
.width
andheight
.calculateArea()
andcalculatePerimeter()
to compute the area and perimeter of the rectangle respectively.Module Program Question:
Create a TypeScript module that contains a function
findMax
which finds the maximum element in an array of numbers.findMin
which finds the minimum element in an array of numbers.Then, import this module into another TypeScript file and use thefindMax
function to find the maximum and minimum number in an array[1, 5, 3, 9, 2]
. Print the result.8/5/2024
1.declare a genrics for taking an array and process the even numbers into one array and odd numbers into anthor array
9/05/2024
1.Can you give me a example for single, multiple multilevel inheritance 1.Identity Function: Write a generic function called identity that takes an argument and returns it without modification. The function should work with any type. 2.First Element of an Array: Create a generic function called firstElement that takes an array as input and returns the first element of that array. Ensure the function works with arrays of any type.
14/05/2024 1.use the https://randomuser.me/api api and show the information in a detailed manner 2.Write a function for removing the duplicates in a typescript array