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
Top comments (0)