6. console.log is not a function? Wat?



So, weird thing happening with the code here. I've been looking through the forums, through other references, can't figure out what's going on. This is the code below for 7.6, Solo Flight. I'm getting a constant console error of

TypeError: console.log is not a function.

What's the cause for this? Never had issues with it before in other instances - is it just a syntax issue or something?

var initialcondition = true;

var soloLoop = function(){
    while (initialcondition){
        console.log("Looped once!");
        initialcondition = false;



try to refresh/reload your browser


Copy your code and reload the page so JavaScript gets reset. Something must have overwritten console.log().

An example of this happening would be the result of writing something like,

console.log = "Looped once!";

That effectively overwrites the method of the console object.

var bob = {};
bob.log = function(x) {

function (x) {
bob.log = "Logging it!";


TypeError: bob.log is not a function


That worked. Thanks guys!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.