mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-19 02:10:04 +08:00
Improve the sample code
This commit is contained in:
parent
48f9f072b4
commit
bda8173932
@ -5,10 +5,13 @@ import OptionsWidget from "../options_widget.js";
|
|||||||
|
|
||||||
const SAMPLE_LANGUAGE = "javascript";
|
const SAMPLE_LANGUAGE = "javascript";
|
||||||
const SAMPLE_CODE = `\
|
const SAMPLE_CODE = `\
|
||||||
function test(name) {
|
const n = 10;
|
||||||
console.log("Works");
|
greet(n); // Print "Hello World" for n times
|
||||||
console.info("Test");
|
|
||||||
// Hello world.
|
function greet(times) {
|
||||||
|
for (let i = 0; i++; i < times) {
|
||||||
|
console.log("Hello World!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user