MDN を⾒るのがオススメ • Can I use • https://caniuse.com !" mozilla のドメイン下にあるが、Google やマイクロソフトなどが Open Web Docs という団体を通じて⽀援をしている https://opencollective.com/open-web-docs/updates/ introducing-open-web-docs #hatenaintern)*)+ !"
্ॻ͖Մೳ const b = "b" // ্ॻ͖ෆՄೳ a = "A" // OK b = "B" // Cannot assign to "b" because it is a constant 変数宣⾔は const を優先して使うことを推奨します。変数が変更され ないことがわかっている場合、コードを読む際の理解が容易になり ます。 #hatenaintern)*)+ !"
= (val: string | number) => { // Property 'toUpperCase' does not exist on type 'string | number'. // Property 'toUpperCase' does not exist on type 'number'. val.toUpperCase() if (typeof val === "string") { // ͜͜Ͱvalstringܕ return val.toUpperCase() } // ͜͜Ͱvalnumberܕ return val.toFixed(2) } #hatenaintern)*)+ !"