Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create an interface Person with properties name and age. Create an object using this interface.

Easy

Problem Statement

Create an interface Person with properties name and age. Create an object using this interface.

Sample Input

Name: "Alice", Age: 25

Sample Output

Name: Alice, Age: 25

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
interface Person { // Define properties } let person: Person = { name: "Alice", age: 25 }; console.log(Name: ${person.name}, Age: ${person.age});
Log in or sign up to run or submit your code.Log inSign up
Input
Name: "Alice", Age: 25
Expected Output
Name: Alice, Age: 25