Yashotantra Academy
AI · Blockchain · Cloud · Data
Dark mode active
Learn
Tracks
ABCD
Certification
More
▾
Dark mode active
Learn
Tracks
ABCD
Certification
Study
Theory
Code Lab
Build
Solidity IDE
Staking Sandbox
Simulation
Reference
Wallets
Gas Fees
Explorers
← Code Lab
React Native
0/50 solved · 0%
All lessons
lesson
code
Security · easy
20. Redacting secrets before logging
Never log a private key or seed.
Write `redact(obj)` returning a shallow copy where values for keys `"privateKey"`, `"mnemonic"` or `"seed"` are replaced with `"[redacted]"`.
Required in your answer:
redacted
Reveal solution
Run & check
Reset
Transpiled, then run in a sandbox
function redact(obj) { // TODO }
Output appears here.
← 19. Building a notification payload
21. useReducer for a send form →