Code
Inline Code
`
. Use the syntax for inserting short code snippets in the text, such as variable names, function names, or brief code statements.print("Hello, World!")
`print("Hello, World!")`
Code Blocks
```
. Use this to display longer code snippets, such as function definitions, algorithm implementations, etc. It helps to clearly show the format and structure of the code.Example
def say_hello(name):
print(f"Hello, {name}!")
say_hello("World")
Specifying a Language
```
. This will apply syntax highlighting according to the programming language. If not specified, it will still display as a code block but without syntax highlighting.This is a code block without a specified language.
System.out.println("Hello, World!");
Modified at 2024-05-28 13:08:19