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

Programming Exercises

Create a function that takes an object and prints all its keys and values.

Easy

Problem Statement

Create a function that takes an object and prints all its keys and values.

Sample Input

Object: { name: "Alice", age: 25, city: "New York" }

Sample Output

name: Alice
age: 25
city: New York

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
let person: { [key: string]: string
Log in or sign up to run or submit your code.Log inSign up
Input
Object: { name: "Alice", age: 25, city: "New York" }
Expected Output
name: Alice
age: 25
city: New York