<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>4_9</title>
<script>
var data = [59, 39, 100, 2, 15, 40, 84, 97];
for (var i = 0; i < data.length; i++) {
}
document.write(data[2] + ' + ' + data[5] + ' = ' + (data[2]+data[5]));
</script>
</head>
<body>
</body>
</html>
More than 5 years have passed since last update.
複数の数値が定義されている配列dataから、「100」と「40」の値を取り出し、2つの値を合算し表示するプログラムを作成
Posted at
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
00