Skip to content

Instantly share code, notes, and snippets.

// Assignment #1
class Calculator {
firstValue: number;
secondValue: number;
constructor(firstValue: number, secondValue: number) {
this.firstValue = firstValue;
this.secondValue = secondValue;
}
@yuliaz19
yuliaz19 / classesHomework
Created October 1, 2025 04:09
Homework lesson 3 Yulia Z
// Class With Fields Only (No Constructor)
class Person {
firstName: string;
lastName: string;
}
const person1 = new Person();
person1.firstName = 'Jane';
person1.lastName = 'Oustean';