This content originally appeared on DEV Community and was authored by Mehul Lakhanpal
Q: Recreate JSON.stringify()
— convert JS values to JSON strings.
What to cover:
- Primitives:
null
,boolean
,number
,string
. - Objects & arrays (recursive traversal).
- Skip functions &
undefined
where appropriate. - Circular references → throw
TypeError
.
💻 Try it + solutions:
🔗 https://replit.com/@318097/Ring-Central-R2-Implement-JSONstringify#index.js
This content originally appeared on DEV Community and was authored by Mehul Lakhanpal

Mehul Lakhanpal | Sciencx (2025-09-18T13:18:00+00:00) 🔁 RingCentral – Round 2: Implement `JSON.stringify()` from scratch. Retrieved from https://www.scien.cx/2025/09/18/%f0%9f%94%81-ringcentral-round-2-implement-json-stringify-from-scratch/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.