You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
729 B
JavaScript
33 lines
729 B
JavaScript
12 months ago
|
console.log('hello world');
|
||
|
|
||
|
// JSON Objects
|
||
|
|
||
|
// {
|
||
|
// "city": "Quezon City",
|
||
|
// "province": "Metro Manila",
|
||
|
// "country": "Philippines"
|
||
|
// }
|
||
|
|
||
|
// "cities":[
|
||
|
// {"city":"Quezon City","province":"Metro Manila","contry":"Philippines"},
|
||
|
// {"city":"Quezon City","province":"Metro Manila","contry":"Philippines"},
|
||
|
// {"city":"Quezon City","province":"Metro Manila","contry":"Philippines"}]
|
||
|
|
||
|
|
||
|
let batchesArr = [{ batchKate: "Batch X" }, { batchName: "Batch Y" }];
|
||
|
|
||
|
console.log("Result from stringify method:");
|
||
|
console.log(JSON.stringify(batchesArr));
|
||
|
|
||
|
// Another Example
|
||
|
let data = JSON.stringify({
|
||
|
name: 'John',
|
||
|
age: 31,
|
||
|
address: {
|
||
|
city: 'Manila',
|
||
|
country: 'Philippines'
|
||
|
}
|
||
|
});
|
||
|
|
||
|
console.log(data);
|