1234567891011121314151617181920212223242526 |
- //let bla = 'JavaScript'
- //console.log("The abbreviation for " + bla + " is " + bla.slice(0, 1) + bla.slice(4, 5))
-
- //let title = "title case";
-
- //console.log(title = title.slice(0, 1).toUpperCase() + "itle" + " " + title.slice(6, 7).toUpperCase() + "ase");
-
-
- //let practicefile = [42, "hello", false, -4.6, "87"]
- //console.log(practicefile)
-
- let cargoHold = ["oxygen tanks", "space suits", "parrot", "instuction manual", "meal packs", "slinky", "security blanket"];
- //cargoHold.splice(5, 2);
- //cargoHold.push("space tether", "security blanket");
- cargoHold[5] = "Space tether"
- cargoHold.pop();
- cargoHold.shift();
- cargoHold.unshift("1138");
- cargoHold.push("20 meters");
- cargoHold.splice(3, 0, "keys");
- cargoHold.splice(4, 1);
-
-
- //cargoHold.push("push");
-
- console.log(cargoHold + " " + cargoHold.length);
|