代码块
实时编辑器
结果
Loading...
多语言语法支持
- JavaScript
- Python
- Java
- Solidity
function helloWorld() {
console.log("Hello, world!")
}
def hello_world():
print("Hello, world!")
class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello, World");
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.8.0;
contract HotFudgeSauce {
uint public qtyCups;
// Get the current hot fudge quantity
function get() public view returns (uint) {
return qtyCups;
}
// Increment hot fudge quantity by 1
function increment() public {
qtyCups += 1; // same as qtyCups = qtyCups + 1;
}
// Function to decrement count by 1
function decrement() public {
qtyCups -= 1; // same as qtyCups = qtyCups - 1;
// What happens if qtyCups = 0 when this func is called?
}
}
npm2yarn2pnpm 自动标签
- npm
- yarn
- pnpm
npm install @docusaurus/remark-plugin-npm2yarn
yarn add @docusaurus/remark-plugin-npm2yarn
pnpm add @docusaurus/remark-plugin-npm2yarn