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

code academy : js復習 ①

Last updated at Posted at 2018-05-02

code academy が英語記述なので、ノートと頭の整理のためのまとめ

topics
1出力console.log
2データ型
3計算


##出力 console.log();

とにかくセミコロン";"を忘れない(出力すり時だけでなく、jsでコーディングする際)


console.log("Hello");
console.log(5);

##データ型

-string(" もしくは 'で囲む)
-numbers(doubleとかの区別なし)
-booleans(true もしくは false)
-null(空っぽって意味.nilと間違わないように注意!)

console.log("Hello");
console.log(5);
console.log(true);
console.log(null);

lengthでstring型の文字数を出力する方法

console.log("Hello".length);

##計算

console.log(5 + 2);
console.log(5 - 2);
console.log(5 * 2);
console.log(5 / 2);
console.log(5 % 2); //余りの算出
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?