1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

JavaScriptでprint()を使う

Last updated at Posted at 2022-11-19

最近はPython3で競プロを楽しんでいます。そんな中、JavaScriptに舞い戻ってくると、思ってしまうことがあります。それは、「console.log() 長すぎでは?」です。
Python3で print() に慣れてしまった体には、 console.log() は億劫に感じられてしまいます。

そこで、邪道ではありますが、JavaScriptで print() を実装してしまおうと考えました。


実装したコード

const print = anything => console.log(anything)

x = 'オススメしません'
print(x)
// >> オススメしません
1
1
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?