HOME Governor Sindh IT Course Saylani SMIT JDC IT CITY BANO QABIL 2.0 DIGISKILL NEWS EXAM QUESTION Privacy Policy Term and Condition About Us

KNOWLEDGE & LEARNING

NEXTJS QUARTER 2

React:

React is a popular JavaScript library for building user interfaces. It allows developers to create reusable UI components and manage the state of complex applications.

Key Features:

1. Component-based architecture
2. Virtual DOM (efficient rendering)
3. One-way data binding
4. Declarative programming style
5. Extensive community and ecosystem

React is ideal for:

1. Building complex, interactive web applications
2. Creating reusable UI components
3. Managing state changes and side effects
4. Integrating with other libraries and frameworks

Next.js:

Next.js is a React-based framework for building server-rendered, statically generated, and performance-optimized web applications.

Key Features:

1. Server-Side Rendering (SSR)
2. Static Site Generation (SSG)
3. Automatic code splitting
4. Built-in routing and navigation
5. Support for internationalization and localization
6. Integrated support for CSS and CSS-in-JS solutions

Next.js benefits:

1. Improved SEO (search engine optimization)
2. Faster page loads
3. Enhanced security
4. Simplified development and deployment
5. Better support for modern web features

Next.js is ideal for:

1. Building fast, scalable, and secure web applications
2. Creating server-rendered and statically generated websites
3. Developing enterprise-level applications
4. Integrating with headless CMS and e-commerce platforms

Comparison:

React vs. Next.js:

- React is a library, while Next.js is a framework built on top of React.
- React focuses on client-side rendering, while Next.js adds server-side rendering and static site generation capabilities.
- React requires additional setup for routing and code splitting, while Next.js provides these features out-of-the-box.

When to use React:

- Building complex, interactive web applications
- Creating reusable UI components

When to use Next.js:

- Building fast, scalable, and secure web applications
- Creating server-rendered and statically generated websites

In summary, React is a powerful library for building UI components, while Next.js is a framework that extends React with server-side rendering, static site generation, and performance optimization features
CSR (Client-Side Rendering) and SSR (Server-Side Rendering) are two popular techniques used in web development to render web pages.

Client-Side Rendering (CSR)

In CSR, the browser renders the web page dynamically using JavaScript. The server sends a minimal HTML document, and the browser fetches data from APIs and renders the page.

Pros:

1. Faster page updates
2. Improved user experience
3. Reduced server load

Cons:

1. Slow initial page load
2. SEO challenges
3. Requires JavaScript support

Server-Side Rendering (SSR)

In SSR, the server generates the HTML document and sends it to the browser. The browser receives a fully rendered page.

Pros:

1. Faster initial page load
2. Better SEO
3. Works without JavaScript

Cons:

1. Slower page updates
2. Increased server load
3. Complex setup

Key differences:

1. Rendering location: CSR (browser), SSR (server)
2. Page load speed: SSR (faster initial), CSR (faster updates)
3. SEO: SSR (better), CSR (challenging)
4. JavaScript requirement: CSR (required), SSR (optional)

Popular frameworks:

CSR:

1. React
2. Angular
3. Vue.js

SSR:

1. Next.js (React-based)
2. Nuxt.js (Vue.js-based)
3. Angular Universal

When to use each:

CSR:

1. Dynamic, interactive applications
2. Real-time updates
3. Complex client-side logic

SSR:

1. Static or mostly static content
2. SEO-critical applications
3. Simple, fast page loads


Typescript Quiz Test Practices for Exams

GOVERNOR SINDH IT COURSE

All code here Exercise 45 , Project & 100 Days Of Challenge


Arrays and its meyhod MCQS IMPORTANT



What is the output of the following code?

Const arr = [1, 2, 3, 4, 5];
Const result = arr.reduce((acc,current) => acc + current,0);
Console.log(result);

A) 15
B) 20

C) 25
D) 30
Correct answer
A) 15
2
What is the output of following code?

Const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
Const result = arr.filter(num => num % 2 === 0);
Console.log(result);

A) [1,3,5]
B) [1, 2, 3, 4, 5]
C) [2, 4, 6, 8, 10]
D) [2, 5, 6, 9, 4]

Correct answer
B) [2, 4, 6, 8, 10]

What is the output of following code?

Const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]
Const result = arr.slice(2,7);
Console.log(result);

A) [1,3,6]
B) [3,4,5,6,7]
C) [3,4,5,6]
D) [2,3,4,5,6]

Correct answer
C) [3,4,5,6,7]

What is the output of the following code?

Const arr = [1, 2, 3, 4, 5];
Const result = arr.filter(num => num % 2 === 0).map(num => num * 2).reduce((acc,current)=> acc + current, 0)

Console.log(result);


A) 20
B) 12
C) 30

D) 40
Correct answer
B) 12

What is the output of following code?

Const arr = [“a”,”b”,”c”];
Const result = arr.join(“ -!- “);
Const result1 = arr.join(“ =/= “);
Console.log(result);
Console.log(result1);


A) A,b,c

B) [a =/= b =/= c=/= ] 2 [a -!- b -!- c -!- ]
C) [a -!- b -!- c -!- ] [a =/= b =/= c=/= ]
D) [a , b , c ]
Correct answer
B) [a -!- b -!- c -!- ] [a =/= b =/= c=/= ]

What is the output of the following code:

Let arr = [1, 2, 3, 4, 5];
Console.log(arr.includes(6));




A) true
B) false
C) 0

C) -1
Correct answer
B) false

Which method is use to concatenate two or more array?


A) merge()
B) join()
C) concat()
D) push()

Correct answer
D) Concat()

What is the output of following code?

Const arr = [1,2,3,4,5]
Const result = arr.map(num => num * 2)
Console.log(result);


A) [1, 2, 3]
B) [2, 4, 6, 8, 10]
C) [2, 4, 6, 8]
D) [3, 4, 5]

Correct answer
B) [2, 4, 6, 8, 10]

What is the output of the following code:

Let arr = [1, 2, 3, 4, 5];
Arr.unshift(0, -1);
Arr.pop();
Console.log(arr);


//* A) [0, -1, 1, 2, 3, 4]
//* A) [-1, 0, 1, 2, 3, 4]
//* A) [0, -1, 1, 2, 3, 5]

//* A) [-1, 0, 1, 2, 4, 5]
Correct answer
//* A) [0, -1, 1, 2, 3, 4]

What is the output of following code?

Const arr1 = [1,2]
Const arr2 = [9,10]
Const result = arr1.concat(arr2)
Console.log(result);


A) [1, 9, 2, 10]
B) [1, 2, 3, 4]
C) [1, 2, 9, 10]
D) [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Correct answer
C) [1, 2, 9, 10]

What is the output of following code?

Const arr1 = [1, 2]
Const arr2 = [3, 4]
Const result =arr1.concat(arr2).join(“ – “)
Console.log(result)

A) [1,2,3,4]

B) [1 – 2 – 3 – 4]
C) 1 – 2 – 3 – 4
D) [ “1 – 2 – 3 – 4”]
Correct answer
B) 1 – 2 – 3 – 4

Which element is used to transform each element of an array?


A) filter()
B) reduce()
C) map()
D) join()

Correct answer
C) Map()

Which is the output of the following code ?

Const names:string[] = [“a”,”b”,”c”,”d”,”e”,”c”,”e”,”f”,”c”]
Const ans1:boolean = names.includes(“c”,3,)
Const ans2:boolean = names.includes(“c”,7,)
Console.log(ans1);
Console.log(ans2);


A) false false
B) true true
C) false true

D) True false
Correct answer
B) true true

What is the output of the following code:

Let arr = [1, 2, 3, 4, 5];
Arr.push(6, 7);
Arr.shift();
Console.log(arr);


A) [2, 3, 4, 5, 6, 7]
B) [6, 7, 2, 3, 4, 5]
C) [1, 3, 4, 5, 6, 7]

E) [7, 2, 3, 4, 5, 6]
Correct answer
A) [2, 3, 4, 5, 6, 7]

What is the output of the following code:

Let arr = [1, 2, 3, 4, 5];
Arr.fill(0, 1, 3);
Console.log(arr);


A) [1, 0, 0, 0, 5]
B) [1, 0, 3, 4, 5]
C) [1, 0, 0, 4, 5]
D) [1, 2, 3, 4, 0]

Correct answer
B) [1, 0, 0, 4, 5]

What is the purpose of the fill() method in an array?


A) To add elements to the end of an array
B) To remove elements from an array
C) To fill an array with a specified value….
D) To sort an array

Correct answer
C) To fill an array with a specified value….

What is the output of the following code:

Let arr = [1, 2, 3, 4, 5];
Console.log(arr.includes(3));


A) true
B) false
C) 0

D) -1
Correct answer
A) True

What is the output of the following code:

Let arr = [1, 2, 3, 4, 5];
Arr.push(6, 7);
Arr.shift();
Arr.splice(2, 1);
Console.log(arr);


A) [2, 3, 5, 6, 7]
B) [2, 4, 5, 6, 7]
C) [2, 3, 6, 7]
D) [7, 2, 3, 5, 6]

Correct answer
A) [2, 3, 5, 6, 7]

What is the output of the following code:

Let arr = [1, 2, 3, 4, 5];
Arr.unshift(0, -1);
Arr.splice(2, 2);
Console.log(arr);


A) [-1, 0, 1, 4, 5]
B) [0, -1, 4, 5]
C) [0, -1, 1, 2, 5]
D) [0, -1, 3, 4, 5] right option


What is the output of the following code:

Let arr = [1, 2, 3, 4, 5];
Arr.slice(1, 3);
Console.log(arr);


A) [1, 2, 3, 4, 5]
B) [2, 3]
C) [1, 4, 5]
D) [1, 2, 4, 5]

Correct answer
B) [1, 4, 5]


Loop QUIZ PRACTICE


1. What is the purpose of the while loop in TypeScript?



a) To execute a block of code repeatedly while a condition is true
b) To execute a block of code only once
c) To skip a block of code
d) To end a program

Answer: a) To execute a block of code repeatedly while a condition is true

2. What is the difference between while and do-while loops in TypeScript?
a) while loops check the condition before executing the loop body, while do-while loops check the condition after executing the loop body
b) while loops execute the loop body at least once, while do-while loops may not execute the loop body at all
c) while loops are used for conditional statements, while do-while loops are used for unconditional statements
d) There is no difference between while and do-while loops in TypeScript

Answer: a) while loops check the condition before executing the loop body, while do-while loops check the condition after executing the loop body



3. What is the purpose of the for loop in TypeScript?


a) To execute a block of code repeatedly for a specified number of iterations
b) To execute a block of code only once
c) To skip a block of code
d) To end a program

Answer: a) To execute a block of code repeatedly for a specified number of iterations

4. What is the syntax for a basic for loop in TypeScript?


a) for (init; cond; incr) { ... }
b) for (init; cond; incr) => { ... }
c) for (init; cond; incr) -> { ... }
d) for (init; cond; incr) > { ... }

Answer: a) for (init; cond; incr) { ... }

5. What is the purpose of the break statement in a loop in TypeScript?


a) To exit the loop immediately
b) To skip to the next iteration of the loop
c) To execute the loop body again
d) To end the program

Answer: a) To exit the loop immediately

6. What is the purpose of the continue statement in a loop in TypeScript?


a) To exit the loop immediately
b) To skip to the next iteration of the loop
c) To execute the loop body again
d) To end the program

Answer: b) To skip to the next iteration of the loop

7. What is an infinite loop in TypeScript?
a) A loop that executes a block of code repeatedly for a specified number of iterations


b) A loop that executes a block of code repeatedly while a condition is true
c) A loop that executes a block of code repeatedly forever
d) A loop that executes a block of code only once

Answer: c) A loop that executes a block of code repeatedly forever

8. How do you create an infinite loop in TypeScript using a while loop?


a) while (true) { ... }
b) while (false) { ... }
c) while (cond) { ... }
d) while (init; cond; incr) { ... }

Answer: a) while (true) { ... }

9. How do you create an infinite loop in TypeScript using a for loop?


a) for (;;) { ... }
b) for (init; cond; incr) { ... }
c) for (init; true; incr) { ... }
d) for (init; false; incr) { ... }

Answer: a) for (;;) { ... }

10. What is the purpose of the label statement in a loop in TypeScript?


a) To specify a label for a loop
b) To specify a condition for a loop
c) To specify an initialization for a loop
d) To specify an increment for a loop

Answer: a) To specify a label for a loop

If-Else Quiz Practice

1. What is the purpose of the if-else statement in TypeScript?
a) To declare variables
b) To loop through arrays
c) To make decisions based on conditions
d) To throw errors

Answer: c) To make decisions based on conditions

2. What is the syntax for an if statement in TypeScript?
a) if (condition) { code }
b) if [condition] { code }
c) if (condition) => { code }
d) if = (condition) { code }

Answer: a) if (condition) { code }

3. What is the purpose of the else clause in an if-else statement?
a) To specify an alternative block of code to execute if the condition
b) To specify an alternative block of code to execute if the condition
c) To repeat the same block of code d) To exit the program Answer: b) To specify an alternative block of code to execute if the c

4. How many conditions can an if-else statement have?
a) Only one
b) Two
c) Multiple
d) None

Answer: c) Multiple

5. What is the difference between if-else and switch statements?
a) If-else is used for conditions, switch is used for values
b) If-else is used for values, switch is used for conditions
c) If-else is used for arrays, switch is used for objects
d) If-else is used for objects, switch is used for arrays

Answer: a) If-else is used for conditions, switch is used for values
6. Can an if-else statement be nested?


a) Yes
b) No
c) Only if the conditions are the same
d) Only if the conditions are different

Answer: a) Yes

7. What happens if the condition in an if statement is not a boolean value?
a) It throws an error
b) It converts the value to a boolean
c) It executes the code anyway
d) It skips the code

Answer: b) It converts the value to a boolean

8. Can an if-else statement be used with a ternary operator?
a) Yes
b) No
c) Only if the conditions are the same
d) Only if the conditions are different

Answer: a) Yes

9. What is the purpose of the else if clause in an if-else statement?
a) To specify an alternative block of code to execute if the first condition is false
b) To specify an alternative block of code to execute if the first condition is true
c) To repeat the same block of code
d) To exit the program

Answer: a) To specify an alternative block of code to execute if the first condition is false

10. How many else clauses can an if-else statement have?
a) Only one
b) Two
c) Multiple
d) None

Answer: c) Multiple
Module Quiz 2 link

PRACTICE AND EXERCISE 65 QUESTION

Q: Determine the Remainder: Make a function that gets two numbers and shows the leftover from dividing them using the % sign. For example, remainder(5, 2) should give 1.


Practice AND Exercise 66 Question

Q:Logical AND Verification: Create a function that checks two boolean (true or false) values. It should only say true if both are true, using the && operator.
For instance, checkBothTrue(true, false) should be false.




QUIZ ARRAYS PRACTICE IMPORTANT



1. What is the syntax for defining a function in TypeScript?

TypeScript
function functionName(parameters: parameterTypes): returnType {
// Function body
}

A. All of the above (Correct)
B. Only option A is correct.
C. Only options A and B are correct.
D. Only options B and C are correct.


2. What are the purposes of parameters in a function?
A. To define the names of variables used within the function. (Correct)
B. To specify the return value of the function.
C. To control the flow of execution within the function.
D. Parameters are not necessary for all functions.


3. What are the different ways to specify parameter types in TypeScript functions?
A. By using keywords like int or string.
B. By using primitive data types like number or string. (Correct)
C. By specifying interface names.
D. All of the above (B & C)


4. What is the difference between a void return type and no return type in a TypeScript function?
A. There is no difference.
B. A function with a void return type explicitly states it doesn't return a value, while a function with no return type might implicitly return undefined. (Correct)
C. A function with a void return type cannot access arguments passed to it.
D. TypeScript requires all functions to have a return type.


5. Can you define optional parameters in TypeScript functions?
A. No, all parameters must be mandatory.
B. Yes, by adding a question mark (?) after the parameter name. (Correct)


6. What is the benefit of using type annotations for function parameters and return values?
A. Makes functions more complex to write.
B. Improves code readability, maintainability, and catches potential errors early. (Correct)
C. TypeScript requires type annotations for all functions.
D. Provides no significant benefits.


7. What are default parameter values in TypeScript functions?
A). A way to pre-populate parameter values with specific constants. (Correct)
B). A way to define optional parameters.
C). Not supported in TypeScript.
D. Default values are automatically assigned by TypeScript if not provided during function call.


8. How can you achieve code reusability with functions in TypeScript?
A. By defining functions with the same name but different parameter types (not recommended).
B. By defining functions with clear and descriptive names that encapsulate specific functionalities. (Correct)
C. By using global variables to share data between functions.
D. Functions cannot be reused in TypeScript.


9. What is the difference between function declarations and function expressions in TypeScript?
A. Function declarations are hoisted, expressions are not. (Correct)
B. Function declarations require a return type, expressions don't.
C. Function expressions can be assigned to variables, declarations cannot.
D. There is no significant difference between them.


10. What are Arrow Functions (lambda expressions) in TypeScript?
A. A concise syntax for defining simple functions. (Correct)
B. A way to define functions with multiple return statements.
C. Not supported in TypeScript.
D. Arrow functions are always anonymous (don't have a name).


The young people of Sindh now have an amazing opportunity to improve their IT abilities, according to Governor Kamran Khan Tessori. Through online registration, interested individuals can apply for the Governor Sindh IT courses 2024 focusing on Artificial Intelligence, Metaverse, and Web 3.0




All in one website Artificial Intillingence ,Sports, Blog, Tourism, Coding just in one click


Typescript Operator Quiz link
Typescript Operator Quiz link

STUDENT MANAGEMENT SYSTEM PROJECT 6 TYPESCRIPT CODE

class School {
name: string;
students: Student[ ] = [ ];
teachers: Teacher[ ] = [ ];

addStudent(stdObj: Student){
this.students.push(stdObj)
}
addTeacher(teObj:Teacher){
this.teachers.push(teObj)
}

constructor(name:String){

}



}

class Student {
name: string;
rollNumber:number;
SchoolName:string;


constructor( name:string, rollNumber:number, schoolName:string){
this.name=name;
this.rollNumber=rollNumber;
this.SchoolName = schoolName
}
}
class Teacher extends Student{}

//school name
let school1 = new School("Delhi High");
let school2 = new School("metropolitican");
let school3 = new School("falcon high");

//student name
let s1 = new Student("Soomro", 24001, school1.name)
let s2 = new Student("ALI", 24001, school2.name)
let s3 = new Student("SYED", 24001, school3.name)

// Teacher
let t1 = new Teacher("hamza",34,school1.name)
let t2 = new Teacher("babar",34,school2.name)
let t3 = new Teacher("RAZA",34,school3.name)

//
school1.addStudent(s1)
school2.addStudent(s2)
school3.addStudent(s3)

//teacher
school1.addTeacher(t1)
school2.addTeacher(t2)
school3.addTeacher(t3)

console.log(t1)
console.log(t2)
console.log(t3)

console.log(school1)
console.log(school2)
console.log(school3)


Pactice question For Loop


1. Printing a multiplication table:

Write a program that takes a number from the user and prints its multiplication table up to a specified limit (e.g., 10).

2. Write counting for loop :

Write program output wiil be Start counting with 31 end on 50



Soon answer will upload



Practice QUESTION FUNCTION


Greet by Name: Create a function greet(name: string) that takes a name as a string and returns a greeting message like "Hello, [name]!".
TypeScript
function greet(name: string): string {
return `Hello, ${name}!`;
}

const message = greet("Alice");
console.log(message); // Output: Hello, Alice!
Use code with caution.
content_copy
Calculate Area of a Rectangle: Define a function calculateArea(length: number, width: number) that takes the length and width of a rectangle as numbers and returns the area (length * width).
TypeScript
function calculateArea(length: number, width: number): number {
return length * width;
}

const rectArea = calculateArea(5, 3);
console.log(rectArea); // Output: 15
Use code with caution.
content_copy
Check if a Number is Even: Write a function isEven(number: number) that takes a number and returns true if it's even, false otherwise. Use the modulo operator (%).
TypeScript
function isEven(number: number): boolean {
return number % 2 === 0;
}

console.log(isEven(10)); // Output: true
console.log(isEven(7)); // Output: false
Use code with caution.
content_copy
Find the Largest Number in an Array: Create a function findLargest(numbers: number[]) that takes an array of numbers and returns the largest number.
TypeScript
function findLargest(numbers: number[]): number {
let largest = numbers[0];
for (const num of numbers) {
if (num > largest) {
largest = num;
}
}
return largest;
}

const myNumbers = [3, 8, 1, 9];
const largestNumber = findLargest(myNumbers);
console.log(largestNumber); // Output: 9
Use code with caution.
content_copy
Convert Celsius to Fahrenheit: Define a function celsiusToFahrenheit(celsius: number) that takes a temperature in Celsius and returns the equivalent value in Fahrenheit (F = (C * 9/5) + 32).
TypeScript
function celsiusToFahrenheit(celsius: number): number {
return (celsius * 9 / 5) + 32;
}

const fahrenheitTemp = celsiusToFahrenheit(20);
console.log(fahrenheitTemp); // Output: 68
Use code with caution.
content_copy
Check if a String is a Palindrome: Create a function isPalindrome(text: string) that takes a string and checks if it reads the same backward as forward (ignoring case and spaces).
TypeScript
function isPalindrome(text: string): boolean {
const cleanText = text.toLowerCase().replace(/ /g, "");
return cleanText === cleanText.split("").reverse().join("");
}

console.log(isPalindrome("racecar")); // Output: true
console.log(isPalindrome("hello world")); // Output: false
Use code with caution.
content_copy
Sum of an Array: Write a function sumArray(numbers: number[]) that takes an array of numbers and returns the total sum. Use the reduce method (optional).
TypeScript
function sumArray(numbers: number[]): number {
// Using for loop
let sum = 0;
for (const num of numbers) {
sum += num;
}
return sum;

// Using reduce (optional)
// return numbers.reduce((acc, curr) => acc + curr, 0);
}

const sum = sumArray([2, 5, 1]);
console.log(sum); // Output: 8
Use code with caution.
content_copy
Calculate Factorial of a Number: Define a function calculateFactorial(number: number) that takes a non-negative number (n) and returns the factorial (n! = n * (n-1) * ... * 1).
TypeScript
function calculateFactorial(number: number): number {
if (number === 0) {
return 1;
} else {
return number * calculateFactorial(number - 1);
}
}

const factorial = calculateFactorial(5);
console.log(factorial); // Output: 120




Practice Question Function


Question 1: Basic Function
Q1: Write a TypeScript function named greet that takes a string parameter name and returns a greeting message.

typescript
Copy code
function greet(name: string): string {
return `Hello, ${name}!`;
}

// Example usage:
console.log(greet("Alice")); // Output: Hello, Alice!
Question 2: Function with Optional Parameter
Q2: Write a TypeScript function named calculateArea that takes two parameters: width and height. The height parameter should be optional. If height is not provided,
the function should return the area of a square (width * width). Otherwise, it should return the area of a rectangle (width * height).

typescript
Copy code
function calculateArea(width: number, height?: number): number {
if (height === undefined) {
return width * width;
}
return width * height;
}

// Example usage:
console.log(calculateArea(5)); // Output: 25
console.log(calculateArea(5, 10)); // Output: 50
Question 3: Function with Default Parameter
Q3: Write a TypeScript function named multiply that takes two parameters: a and b. The parameter b should have a default value of 1. The function should return the product of a and b.

typescript
Copy code
function multiply(a: number, b: number = 1): number {
return a * b;
}

// Example usage:
console.log(multiply(5)); // Output: 5
console.log(multiply(5, 2)); // Output: 10
Question 4: Function with Rest Parameters
Q4: Write a TypeScript function named sum that takes any number of parameters (numbers) and returns their sum. Use rest parameters in your function definition.

typescript
Copy code
function sum(...numbers: number[]): number {
return numbers.reduce((acc, curr) => acc + curr, 0);
}

// Example usage:
console.log(sum(1, 2, 3)); // Output: 6
console.log(sum(4, 5, 6, 7, 8)); // Output: 30
Question 5: Function with Union Types
Q5: Write a TypeScript function named formatInput that takes a parameter input which can be either a string or a number. If input is a string, the function should return the string in
uppercase. If input is a number, the function should return the number multiplied by 10.

typescript
Copy code
function formatInput(input: string | number): string | number {
if (typeof input === "string") {
return input.toUpperCase();
}
return input * 10;
}

// Example usage:
console.log(formatInput("hello")); // Output: HELLO
console.log(formatInput(5)); // Output: 50
These examples cover basic to intermediate function usage in TypeScript, including optional parameters, default parameters, rest parameters, and union types.