JAVASCRIPT Telegram 2727
CHALLENGE

const data = '{"name": "Maria", "age": 25, "skills": ["JavaScript", "Python"]}';

try {
const parsed = JSON.parse(data);
const modified = {
...parsed,
age: parsed.age + 5,
skills: [...parsed.skills, "TypeScript"]
};

const serialized = JSON.stringify(modified, null, 0);
const reparsed = JSON.parse(serialized);

console.log(reparsed.skills.length);
console.log(typeof reparsed.age);
} catch (error) {
console.log('Parse error');
}
6



tgoop.com/javascript/2727
Create:
Last Update:

CHALLENGE

const data = '{"name": "Maria", "age": 25, "skills": ["JavaScript", "Python"]}';

try {
const parsed = JSON.parse(data);
const modified = {
...parsed,
age: parsed.age + 5,
skills: [...parsed.skills, "TypeScript"]
};

const serialized = JSON.stringify(modified, null, 0);
const reparsed = JSON.parse(serialized);

console.log(reparsed.skills.length);
console.log(typeof reparsed.age);
} catch (error) {
console.log('Parse error');
}

BY JavaScript


Share with your friend now:
tgoop.com/javascript/2727

View MORE
Open in Telegram


Telegram News

Date: |

How to Create a Private or Public Channel on Telegram? ‘Ban’ on Telegram Users are more open to new information on workdays rather than weekends. The creator of the channel becomes its administrator by default. If you need help managing your channel, you can add more administrators from your subscriber base. You can provide each admin with limited or full rights to manage the channel. For example, you can allow an administrator to publish and edit content while withholding the right to add new subscribers. Among the requests, the Brazilian electoral Court wanted to know if they could obtain data on the origins of malicious content posted on the platform. According to the TSE, this would enable the authorities to track false content and identify the user responsible for publishing it in the first place.
from us


Telegram JavaScript
FROM American