It looks like you didn't log to the console


I am stuck in the same spot. I think I have the same code. It just keeps saying, "It looks like you didn't log to the console." No duh. But I don't know why!

Here's my code - it should look very familiar. I've checked capital letters, ===, semicolons... What am I missing?

var bob = {
firstName: "Bob",
lastName: "Jones",
phoneNumber: "(650) 777-7777",
email: ""

var mary = {
firstName: "Mary",
lastName: "Johnson",
phoneNumber: "(650) 888-8888",
email: ""

var contacts = [bob, mary];

function printPerson(person) {
console.log(person.firstName + " " + person.lastName);

function list() {
var contactsLength = contacts.length;
for (var i = 0; i < contactsLength; i++) {

var search = function (lastName) {
var contactsLength = contacts.length;
for(var j = 0; j < contacts.Length; j++) {
if (lastName === contacts[j].lastName) {

5. Finding that Special Someone

Hey there! In your for-loop you've written contacts.Length but this should be contacts.length.

If you write .Length the length-function won't be recognised as the .length funtion.


For the record, .length is a property/attribute, not a function.


Thanks! I knew it would be something stupid like that. I should have tried learning this stuff before I turned 46 and my eyes stopped working. I'm very grateful to all the folks who are willing to help with that kind of tedious checking for us old newbies. :slight_smile:


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