最近プログラミングを始めまして、次にくる電車の時刻を出せるwebサイトを作りたいと思ってるんですど、配列に時刻を入れてからどうすればいいのかわかりません、アドバイスをもらえないでしょうか?
let now = new Date(); let hour = now.getHours(); let mini = now.getMinutes(); const time = [ 509, 519, 529, 539, 549, 559, 609, 615, 621, 624, 628, 632, 636, 639, 642, 645, 649, 653, 656, 659, 701, 704, 707, 709, 711, 714, 717, 720, 723, 726, 728, 730, 733, 735, 737, 739, 742, 744, 746, 748, 751, 753, 755, 757, 800, 802, 804, 806, 809, 811, 813, 815, 818, 820, 822, 824, 827, 829, 831, 833, 836, 839, 841, 844, 844, 844, 847, 850, 853, 857, 900, 903, 906, 908, 912, 915, 918, 921, 925, 929, 932, 936, 940, 944, 948, 952, 956, 1000, 1004, 1008, 1012, 1016, 1020, 1024, 1028, 1032, 1036, 1040, 1044, 1048, 1052, 1056, 1100, 1104, 1108, 1112, 1116, 1120, 1124, 1128, 1132, 1136, 1140, 1144, 1148, 1152, 1156, 1200, 1204, 1208, 1212, 1216, 1220, 1224, 1228, 1232, 1236, 1240, 1244, 1248, 1252, 1256, 1300, 1304, 1308, 1312, 1216, 1320, 1324, 1328, 1332, 1336, 1340, 1344, 1448, 1352, 1556, 1400, 1404, 1408, 1412, 1416, 1420, 1424, 1428, 1432, 1436, 1440, 1444, 1448, 1452, 1456, 1500, 1504, 1508, 1512, 1516, 1520, 1524, 1528, 1532, 1536, 1540, 1544, 1548, 1552, 1556, 1600, 1604, 1608, 1612, 1616, 1620, 1624, 1627, 1630, 1632, 1635, 1637, 1640, 1642, 1645, 1648, 1650, 1653, 1656, 1700, 1703, 1706, 1708, 1711, 1714, 1717, 1719, 1722, 1724, 1727, 1729, 1732, 1734, 1739, 1742, 1744, 1747, 1749, 1752, 1754, 1757, 1759, 1802, 1804, 1807, 1809, 1812, 1815, 1818, 1820, 1823, 1825, 1828, 1830, 1833, 1835, 1838, 1840, 1843, 1845, 1848, 1851, 1854, 1856, 1858, 1901, 1904, 1908, 1911, 1914, 1918, 1921, 1924, 1927, 1931, 1935, 1939, 1942, 1945, 1953, 1956, 2000, 2004, 2008, 2011, 2014, 2018, 2021, 2024, 2028, 2031, 2035, 2040, 2043, 2047, 2051, 2054, 2058, 2101, 2104, 2104, 2109, 2114, 2119, 2124, 2129, 2134, 2139, 2144, 2149, 2154, 2159, 2204, 2209, 2214, 2219, 2224, 2229, 2234, 2239, 2244, 2249, 2254, 2259, 2304, 2309, 2313, 2319, 2324, 2328, 2332, 2339, 2345, 2356, ];
回答5件
あなたの回答
tips
プレビュー