This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const street = user.address?.street |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (data && data.length > 0) { | |
data.map(item => <div>{item}<div>) | |
} | |
/* or */ | |
data && data.length > 0 && data.map(item => <div>{item}<div>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const data = [] | |
data.map(item => <div>{item}</div>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const street = user.address && user.address.street; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Chart } from "frappe-charts/dist/frappe-charts.min.esm"; | |
const data = { | |
labels: [ | |
"12am-3am", | |
"3am-6pm", | |
"6am-9am", | |
"9am-12am", | |
"12pm-3pm", | |
"3pm-6pm", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Chart } from "frappe-charts/dist/frappe-charts.min.esm"; | |
new Chart("#pie", { | |
data: { | |
labels: ["android", "iOS", "KaiOS", "windows", "Samsung", "unknown"], | |
datasets: [ | |
{ | |
values: [76.03, 22.04, 0.79, 0.21, 0.21, 0.32] | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Chart } from "frappe-charts/dist/frappe-charts.min.esm"; | |
new Chart("#pie", { | |
data: { | |
labels: ["android", "iOS", "KaiOS", "windows", "Samsung", "unknown"], | |
datasets: [] | |
}, | |
title: "Mobile Operating System Market Share Worldwide", | |
type: "pie", | |
colors: ["#2947ff", "#f44336", "#aeff62", "#e91e63", "#9c27b0", "#141021"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<div id="pie"></div> | |
<script src="src/pie.js"></script> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Chart } from "frappe-charts/dist/frappe-charts.min.esm" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fs = require('fs'); | |
console.log('1'); | |
fs.readFile('test.txt', 'utf8', function(error, data) { | |
if (error) { | |
throw error; | |
} | |
console.log('2'); |