/run typescript5
const words = '\u30b4\u30ea'
console.log([...words.repeat(2)].sort(() => Math.random() - 0.5).join(''))
Python使いの呼び方はPythonistaしか知らないのだけど、いつの間にPythonerとか出てきたんだろう?
そしていつの間にPythonista3というアプリが出ていたんだろう?
nostr:note1mh5ecywzn7fv8nl3y5vgmlhfqjks0707nzcld8y6cv76mgrqafjqse4n9n
よしよし、targetをES5にしたTypeScriptは通る
/run typescript
const words = '\u30b4\u30ea'
console.log(Array.apply(null, Array(2)).map(_ => words).join('').split('').sort(() => Math.random() - 0.5).join(''))
返ってきたけどコードがおかしかった
/run typescript
const words = '\u30b4\u30ea'
console.log(Array.apply(null, Array(2)).map(_ => words).join('').split('').sort(() => Math.random() - 0.5))
tsconfig.jsonのtargetがES2015以降になっていれば動くのかな
まともなエラーメッセージが返ってきてるのはこれくらいか
nostr:note1leasc000hp2rag3f9p3afgyrhzv0fel66ptf7htlvcfz7xn2fr0q69es46
/run typescript5
const words = '\u30b4\u30ea'
const shuffled = [...words.repeat(2)].sort(() => Math.random() - 0.5)
console.log(shuffled)
/run typescript
const words = '\u30b4\u30ea'
const shuffled = [...words.repeat(2)].sort(() => Math.random() - 0.5)
console.log(shuffled)
/run typescript
console.log('Hello world')
/run typescript
console.log("Hello world");
TypeScript Playgroundだとこのコードで通るんだけどなぁ
あらら
/run ts
const words = '\u30b4\u30ea'
console.log([...words.repeat(2)].sort(() => Math.random() - 0.5))
YakiHonne…焼き本音?
x is Tとかする方が素直と言うのであれば、まぁがんばってくださいとしか言いようがないかな
xs.flatMap((x) => x == null ? [] : [x])
ではダメですか?
メルカリで狙っていたものがいい値段で出ていたのだけど、悩んでいるうちに買われてしまった
うぬぬぬ…