The book of 1 John is a book about the basics of Christianity. Several times John raises the question of how we know we are followers of Christ. He answers that question by looking at the life of Christ and calling us to compare our life with what we see. Christ's command is for us to love one another and his life example is to lay down our lives for our brothers.
"Whoever says he is in the light and hates his brother is still in darkness. Whoever loves his brother abides in the light, and in him there is no cause for stumbling." 1 John 2:9-10