var sum;
var num = 1; //数値型
var str = '1'; //文字列型
// 数値型(1) + 数値型(1)
sum = num + num;
document.write("<p>1 + 1 = " + sum + "</p>");
// 文字列型('1') + 文字列型('1')
sum = str + str;
document.write("<p>'1' + '1' =" + sum + "</p>");
// 数値型(1) + 文字列型('1')
sum = num + str;
document.write("<p>1 + '1' = " + sum + "</p>");
// 論理型
var flag;
flag = true; // 真
document.write("<p>true => " + flag + "</p>");
flag = false; // 偽
document.write("<p>false => " + flag + "</p>");
// null型
var nothing = null; //null型
document.write("<p>null => " + nothing + "</p>");
// undefined型
var undef;
document.write(undef); // undefined
js_cc_type
----------
A [Pen](https://codepen.io/m-shinkawa/pen/XYbbRB) by [m-shinkawa](https://codepen.io/m-shinkawa) on [CodePen](https://codepen.io).
[License](https://codepen.io/m-shinkawa/pen/XYbbRB/license).
js_cc_01_type
-------------
A [Pen](https://codepen.io/m-shinkawa/pen/XYbbRB) by [m-shinkawa](https://codepen.io/m-shinkawa) on [CodePen](https://codepen.io).
[License](https://codepen.io/m-shinkawa/pen/XYbbRB/license).