Week 1, Day 4: Big O, Algorithms, and Game of Life

November 3, 2016

Today, we went over our selector/DOM traversal exercise from yesterday, and our instructors showed us some ES6 syntax. I thought the coolest one was array destructuring, which allows you to assign multiple variables to multiple array elements at once. For example, instead of doing this: arrayOfVals = [1, 2, 3]; x = arrayOfVals[0]; y = arrayOfVals[1]; z = arrayOfVals[2]; You can do this: arrayOfVals = [1, 2, 3]; [x, y, z] = arrayOfVals; And x, y, and z will be assigned to 1, 2, and 3.

Continue reading