1const numbers1 = [1, 2, 3, 4, 5];const numbers2 = [ ...numbers1, 1, 2, 6,7,8]; // this will be [1, 2, 3, 4, 5, 1, 2, 6, 7, 8]
1// Extracts elements in Dict
2let team = {
3 lead: "Bob",
4 num2: "Rob",
5 num3: "Dog",
6}
7// team
8{lead: "Bob", num2: "Rob", num3: "Dog"}
9
10let students = {
11 num1: "Andy",
12 num4: "Ben",
13 ...team
14}
15//students
16{num1: "Andy", num4: "Ben", lead: "Bob", num2: "Rob", num3: "Dog"}
1var dotGeometry = new THREE.Geometry();
2dotGeometry.vertices.push(new THREE.Vector3( 0, 0, 0));
3var dotMaterial = new THREE.PointsMaterial( { size: 1, sizeAttenuation: false } );
4var dot = new THREE.Points( dotGeometry, dotMaterial );
5scene.add( dot );
6
1this.setState(prevState => {
2 return {foo: {...prevState.foo, a: "updated"}};
3});
4