JSON.stringify() II

Extend your JSON.stringify implementation with replacer function and indentation support.

Asked in Google frontend interviews