1
0

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 5 years have passed since last update.

JSでログを吐き出すコマンド

Last updated at Posted at 2018-11-21

#JSでログを吐き出すコマンド

console.log("Hello");

##オブジェクト内を参照するには

var dummyObj = {
 elm: {
   a: 1,
   b: 2
 }
}
console.log('dummyObj.elm.a:' + dummyObj.elm.a);
console.log('dummyObj.elm.b:' + dummyObj.elm.b);

など。

###JSONで吐き出すには

console.log(JSON.stringify(dummyObj));

とする。

console.dir(dummyObj);

とかも可能。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?