JS

Defensive Banking Dashboard

LAB EXERCISE 02

Modern JavaScript Essentials · Banking Data Workshop

CORE MISSION

Make an Unreliable Banking API Safe for the Dashboard

Protect the dashboard from missing nested data, null values, and optional fields. Create a new safe view model without mutating the API response.

Skills
destructuring · defaults · optional chaining · ?? · spread · immutable update

🏦 Scenario

A banking dashboard receives customer/account data from an API. The API is not always complete: nested profile data may be missing, balance may be null, and some records do not contain accountType. The UI must never crash.

📋 Requirements

0 / 7

🧭 Guideline Solution

ก้าวทีละ Step — เปิดเฉพาะขั้นที่ติด ไม่ต้องดูเฉลยทั้งหมด

Step 1 / 7

🤖 AI Challenge

Ask Copilot/AI to make the code defensive. Then review the generated code. Look specifically for || vs ??. Do not regenerate the whole solution after finding one mistake.

💻 Code Workspace