← All tasks
🧮
Programming Beginner

Write an array_map Expression to Square Values

⏱ 3 min ⭐ 90 XP 🔁 3 attempts allowed

What you'll do

Write the PHP expression that returns a new array with every number in $numbers squared.

Scenario

You need a transformed copy of $numbers where each value is squared, without mutating the original.

Ready to try it?

Create a free account and try "Write an array_map Expression to Square Values" free for 7 days, no card required. Earn 90 XP and track your internship progress.

Already have an account? Sign in