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

Programming Exercises

Write a component that dynamically renders a list of user profiles passed as hardcoded props.

Easy

Problem Statement

Write a component that dynamically renders a list of user profiles passed as hardcoded props.

Sample Input

users = [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }]

Sample Output

Alice
 Bob

Limits

Time: 2s · Memory: 256 MB

Code Editor

Try your code in this preview. Submit marks it done.

import React from "react";
 
 const UserList = (props) => {
  // Map over props.users to render the list
 };
 
 export default UserList;