fn main() {
println!("Hello World");
}
Same snippet with line numbers:
fn main() {
println!("Hello World");
}
Same snippet with line numbers and line highlighting:
fn main() {
println!("Hello World");
}
Python example:
def main():
print("Hello, world!")
This is another code block with syntax highlighting. It's pretty cool, right?
You can also have inline code like this: var example = true.
function debounce(func, wait) {
var timeout;
return function () {
var context = this;
var args = arguments;
clearTimeout(timeout);
timeout = setTimeout(function () {
timeout = null;
func.apply(context, args);
}, wait);
};
}
C++ example:
#include <iostream>
using namespace std;
int main() {
cout << "Hello, World!" << endl;
return 0;
}