//$( document ).ready(function() {
  
  function doIt() {
    
    	for (var a=[]; a.push([])<10;);
    	
    	console.log(a);

    function addHouseIfNew() {
      for(var i = 0; i < houses.length; ++i) {
        if(houses[i].x == x && houses[i].y == y) {
          return;
        }
      }
      var house = {};
      house.x = x;
      house.y = y;
      houses.push(house);
    }
    
    var steps = $.trim($('#lol').text());
    var x = 0;
    var y = 0;
    var firstHouse = {'x' : x, 'y' : y};
    var houses = [firstHouse];
    for(var i = 0; i < steps.length;++i) {
      var move = steps[i];
      
      if(move == '>') {
        // RIGHT
        ++x;
      } else if(move == '<') {
        // LEFT
        --x;
      } else if(move == '^') {
        // UP
        ++y;
      } else {
        // DOWN
        --y;
      }
      addHouseIfNew();
      if(move != '^' && move != '<' && move != '>' && move != 'v') {
        alert(move);
      }
    }
  
    $('#result').text('Result = ' + houses.length);
  }
//});

//$( document ).ready(function() {
  
  function doIt() {
    
    function success(data) {
      
      $('#lol').text(data);
      var steps = $.trim($('#lol').text());
      
      function addHouseIfNew() {
        for(var i = 0; i < houses.length; ++i) {
          if(houses[i].x == x && houses[i].y == y) {
            return;
          }
        }
        var house = {};
        house.x = x;
        house.y = y;
        houses.push(house);
      }
      
      var steps = $.trim($('#lol').text());
      var x = 0;
      var y = 0;
      var firstHouse = {'x' : x, 'y' : y};
      var houses = [firstHouse];
      for(var i = 0; i < steps.length;++i) {
        var move = steps[i];
        
        if(move == '>') {
          // RIGHT
          ++x;
        } else if(move == '<') {
          // LEFT
          --x;
        } else if(move == '^') {
          // UP
          ++y;
        } else {
          // DOWN
          --y;
        }
        addHouseIfNew();
        if(move != '^' && move != '<' && move != '>' && move != 'v') {
          alert(move);
        }
      }
    
      $('#result').text('Result = ' + houses.length);
      
    };
    
    $.ajax({
      url: 'http://adventofcode.com/day/3/input',
      type:'GET'
      data: data,
      success: success,
      dataType: 'jsonp'
    });
  }
//});

Update custom.js