Need JS help. Am I missing something?
@angristan splice mutates the original array, so there is no need to assign to str. i dont remember what the return value of splice is but it maybe be the empty array you see
@Gargron @angristan Returned value is the deleted items
@angristan Do not assign the output of Array.splice().
foo = [];
foo.splice(0,0,'a');
console.log(foo); // ['a']
That's why I was asking in the first place, and I was using splice correctly
I didn't understand why my function didn't do anything.. I thought that splice wasn't usable with variables or something?!
Turns out I was replacing each character with itself...
(first screen = dumb, second = ok)
@angristan What are you trying to do? :o
@Sp3r4z switching the 2nd and 6th character in a string
@angristan All right, just because it wasn't clear :) It's funny, and welcome into JS world :p
@Sp3r4z I'm having way more fun with JS than with C u_u
@angristan It's quite different, and JS isn't as strict as C⦠I'm quite addict to "use strict" in JS files :D
@Sp3r4z C is interesting for this (and type, and pointers) but... ugh 
@angristan "this" like the class itself in PHP, JS⦠? :o
@Sp3r4z I was referring to the strictness
@angristan Ahah right :3
Sure it is, maybe too much sometime, for begginers :/
@Sp3r4z I discovered "use strict" yesterday but didn't take a look at it yet!
@angristan Really funny, it's quite interesting just testing "small JS file" wth a "use strict" on top⦠Most of the time, lot of problem exists :/
@angristan Semi colons