var a = [100, 6, 29, 24, 66, 7, 28, 35, 87]
var b = []
for (let i = 0; i < a.length; i++) {
b.push(a[i])
}
for (let i in a) {
b.push(a[i])
}
a.forEach((v) => b.push(v))
for (let v of a) {
b.push(v)
}
var a = [100, 6, 29, 24, 66, 7, 28, 35, 87]
var b = a.map(x => x + 1) // a 陣利內的元素全加1
console.log(b)
var c = a.map(x => x) // 複製一份到 c 陣列
console.log(c)
var a = [100, 6, 29, 24, 66, 7, 28, 35, 87]
console.log(a) // [1,2,3,4]
console.log(...a) // 1 2 3 4
var b = [...a]
JavaScript
順序 學號 姓名 作品 1 b05104044 黃楷鈞 2
Jun 15, 2021PT2 範例一 (錯誤) import java.util.Scanner; public class PT2 { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("請輸入三角型的底:"); int base = in.nextInt();
Dec 21, 2020官網 jQuery https://jquery.com/ 安裝 下載 -> 找 Google CDN -> 將下面的連接貼到靠近 </body> <script src="https://code.jquery.com/jquery-3.5.1.js"></script> 基本語法 $('CSS selector').action()
Dec 1, 2020PT4_2.java import java.util.Scanner; public class PT4_2 { // ================ // 使用者的角色 public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("請輸入一個整數n:");
Nov 2, 2020or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up