These are chat archives for Colt/WDB-CodeTalk

11th
Jan 2017
Jake Geiser
@Geiser9
Jan 11 2017 03:37
@G1anpierre incase you wanted to see a simpler solution using a forEach for you sumArray:
``````function sumArray(arr){
total = 0;
arr.forEach(function(element) {
total += element; //adds in each element of the array into the total
});

}``````
panatda inthala
Jan 11 2017 03:45
Hey guys, new to this web development boot camp! Excited to learn and get to know all of you!
Jake Geiser
@Geiser9
Jan 11 2017 03:51
erfranson
@erfranson
Jan 11 2017 05:31
Hey guys new to the boot camp excited to get to know you!!
Labib Chowdhury
@la4ever
Jan 11 2017 11:57
hello just started this code looking for someone to pair with me
Abhishek Rana
@abhirana13
Jan 11 2017 15:43
Hey guys, Just started this course!! Nice to meet you all :)
KacimFedjkhi
@KacimFedjkhi
Jan 11 2017 17:28
Hello everyone, I'm starting this course now. Greetings from Belgium!
uncll
@uncll
Jan 11 2017 17:45
Hey there!
If someone could tell me abour the tic tac toe css exercise? :)
The main point is: Colt used a tables fro creating that board. What about divs solution? I've made everething with divs and it works fine!
Boomer
@boomer1204
Jan 11 2017 17:56
@uncll I was curious about that as well since using tables for styling is highly frowned upon now a days
uncll
@uncll
Jan 11 2017 17:59
@boomer1204 thats too. But I just havent hear about the tables and began with divs :)
Fuko12345_SK
@Davvvid12345
Jan 11 2017 19:12

Hey Guys .. need little help with js code.
This bellow works fine
for ( i = 0 ; i < list.length ; i++){
this.style.color = "pink";
});
}

But I was just wondering to replace this with list[i] but that seem to be an error. Can someone explain it to me quickly? THX

Drew
@seijya
Jan 11 2017 19:31
I believe he explains that in the video, but basically you can't replace "this" with "list[i]" because it won't recognize it.
When the click listener is called at some random later point after you load the code, it will try accessing the ith index which doesn't exist outside of the for loop
Pedro Vieira de Castro
@PedroDVC
Jan 11 2017 20:20
Hello people! Starting this bootcamp today. All the best to you all!
Boomer
@boomer1204
Jan 11 2017 20:37
@Davvvid12345 if you were to use "this" because it will be in a for loop it will be the window not the item itself check the "this cheatsheet" https://github.com/gordonmzhu/cheatsheet-js