<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>top</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME=viewport CONTENT="width=device-width, initial-scale=1">
<LINK REL="stylesheet" TYPE="text/css" HREF="../../../master.css">
</HEAD>
<BODY CLASS="white">
<H1 STYLE="text-align: center">トップレベル関数(ビルトイン関数)</H1>
<SCRIPT TYPE="text/javascript">
document.writeln("<DL>");
document.writeln("<DT>eval");
document.writeln("<DD>10 + 20 は " + eval("10 + 20"));
document.writeln("<DT>isNaN");
document.writeln("<DD>10(半角) は " + isNaN("10") + ",10(全角) は " + isNaN("10")); document.writeln("<DT>isFinite");
document.writeln("<DD>1.25 は " + isFinite(1.25) + ", Infinity は " + isFinite(Infinity));
document.writeln("<DT>parseInt");
document.writeln("<DD>125 は " + parseInt("125") + ", abc は " + parseInt("abc"));
document.writeln("<DD>以下はすべて 20: " + parseInt("20", 10) + "( 10 進の 20 ), " + parseInt("10100", 2) + "( 2 進の 10100 ), " + parseInt("24", 8) + "( 8 進の 24 ), " + parseInt("14", 16) + "( 16 進の 14 )");
document.writeln("<DT>parseFloat");
document.writeln("<DD>1.25 は " + parseFloat("1.25") + ", abc は " + parseFloat("abc"));
document.writeln("<DT>escape と unescape");
let str0 = "変換文字列";
let str1 = escape(str0);
let str2 = unescape(str1);
document.writeln("<DD>「" + str0 + "」 を変換すると 「" + str1 + "」");
document.writeln("<DD>「" + str1 + "」 を元に戻すと 「" + str2 + "」");
document.writeln("</DL>");
</SCRIPT>
</BODY>
</HTML>