LoginSignup
0
0

More than 3 years have passed since last update.

P5.js 日本語リファレンス(print)

Last updated at Posted at 2020-05-10

このページでは「P5.js 日本語リファレンス」 の print関数を説明します。

print()

説明文

print() はブラウザのコンソール領域に書き込みます。この関数は、プログラムが生成しているデータを確認(デバッグ)するのに役立ちます。この関数は、呼び出しごとに新しいテキスト行を作成します。個々の要素は引用符("")で区切り, 加算演算子(+)で結合できます。

引数なしで print() を呼び出すと, ブラウザの印刷ダイアログを開く window.print() が呼び出されることに注意してください。空白行をコンソールに出力するには print('\ n') と記述します。

構文

print(contents)

パラメタ

  • contents
    任意:コンソール領域に書き込む数値、文字列、オブジェクト、ブール値、配列 の任意の組み合わせ

let x = 10;
print('xの値は' + x); //「xの値は10です」と出力します

著作権

p5.js was created by Lauren McCarthy and is developed by a community of collaborators, with support from the Processing Foundation and NYU ITP. Identity and graphic design by Jerel Johnson.

ライセンス

Creative Commons(CC BY-NC-SA 4.0) に従います。

0
0
0

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
0
0