class Hoge {
#name;//private field
static type = "Hoge";//static field
static #count = 0;//static private field
static {//クラス宣言の評価時に一度だけ実行
this.#init = Math.random();
}
consctructor (name) {
this.#name = name;
}
//private method
#fuga() {
this.#name
}
}
const hoge = new Hoge();
// in
console.log( "#name" in hoge );// false
await キーワードを非同期関数の外側でも使用できるようにするもの
即時関数等を使っていたのが不要になる
const res = await fetch('https://api.github.com/users/octocat');
await res.json();
throw new Error("failed", { cause: error });
const regexp = /私の姓は(.*)、名前は(.*)です/du;
const result = '私の姓は山田、名前は太郎です'.match(regexp)
console.log(result.indices[1]) // [4,6]
console.log(result.indices[2]) // [10,12]
const regexp = /私の姓は(?<sei>.*)、名前は(?<mei>.*)です/du;
const result = '私の姓は山田、名前は太郎です'.match(regexp)
https://ics.media/entry/220610/
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing