We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
题目:
已知如下数据:
let country = { name: 'China', language: 'Chinese', population: { value: 14, unit: '亿' } };
请使用 JSON.stringify 将其转化为以下格式的字符串:
JSON.stringify
--"name": "China", --"language": "Chinese", --"population": "14 亿"
参考答案:
JSON.stringify(country, (k, v) => { if (k === 'population') { return `${v.value} ${v.unit}`; } return v; }, '--').replace(/\{|\}/g, '');
The text was updated successfully, but these errors were encountered:
No branches or pull requests
题目:
已知如下数据:
请使用
JSON.stringify
将其转化为以下格式的字符串:参考答案:
The text was updated successfully, but these errors were encountered: