I should use console log instead of JsFiddle for JS, alright thanks
I surely didnt say that or imply that. console.log is a method that allows you to write to the console. that's about it. Its not comparible to jsFiddle. If you were using jsFiddle for this purpose, then i guess you dont need jsFiddle.
I use console.log for troubleshooting. I have seen others use the alert() method instead of console.log(). The point is that if you want to see what the value of a variable is or just write to a log to check the flow of your script, it works great for that reason.
make sure that you wrap the word "what" with quotes. otherwise, it will be undefined since you havent defined a variable called what. that's the only thing i can think of at this moment without seeing your code.