

Property Lookup
Write a function lookupProperty(obj, key) that takes an object and a key string. If the object has that property (not undefined), return its value. Otherwise, return 'Property not found'.
Examples
lookupProperty({ name: "Nova", level: 4 }, "name")
→ "Nova"
lookupProperty({ name: "Nova" }, "xp")
→ "Property not found"
solution.js
JAVASCRIPT
Saved as you type
Tests
0 of 3 passing- •key exists → valuelookupProperty({ name: "Nova", level: 4 }, "name")expected "Nova"
- •key missing → not foundlookupProperty({ name: "Nova" }, "xp")expected "Property not found"
- •empty obj → not foundlookupProperty({})expected "Property not found"
On the line
+40 XP
Pass all 3 tests to claim it.
