function createMessageElement(messageObject) {
    // #8 #message convert expiresOn to expiresIn
    var diffExpires = messageObject.expiresOn - Date.now();
    var expiresIn = Math.round(((diffExpires % 86400000) % 3600000) / 60000);
    
    // #8 #message #append the message HTML to the messages div
    $('#messages').append('<div class="message"><h3><a href="http://w3w.co/'
        + messageObject.createdBy + 
        '" target="_blank"><strong>' 
        + messageObject.createdBy + 
        '</strong></a>' 
        + messageObject.createdOn +
        '<em>'
        + expiresIn + 
        ' min. left</em></h3><p>' 
        + messageObject.text + 
        '</p><button>+5 min.</button></div>')
}
//#8 #message #element take a message object and make it a string representation of an HTML element

8 #message #element take a message object and make it a string representation of an HTML element
8 #message #element take a message object and make it a string representation of an HTML element
function createMessageElement(messageObject) {
    var diffExpires = messageObject.expiresOn - Date.now();
    var expiresIn = Math.round(((diffExpires % 86400000) % 3600000) / 60000);
    $('#messages').append('<div class="message"><h3><a href="http://w3w.co/'
        + messageObject.createdBy + 
        '" target="_blank"><strong>' 
        + messageObject.createdBy + 
        '</strong></a>' 
        + messageObject.createdOn +
        '<em>'
        + expiresIn + 
        ' min. left</em></h3><p>' 
        + messageObject.text + 
        '</p><button>+5 min.</button></div>')
}
function createMessageElement ( messageObject ) { var diffExpires = messageObject . expiresOn - Date . now ( ) ; var expiresIn = Math . round ( ( ( diffExpires % 86400000 ) % 3600000 ) / 60000 ) ; $ ( '#messages' ) . append ( '<div class="message"><h3><a href="http://w3w.co/' + messageObject . createdBy + '" target="_blank"><strong>' + messageObject . createdBy + '</strong></a>' + messageObject . createdOn + '<em>' + expiresIn + ' min. left</em></h3><p>' + messageObject . text + '</p><button>+5 min.</button></div>' ) }
8 #message #element take a message object and make it a string representation of an HTML element
8 #message #element take a message object and make it a string representation of an HTML element
// #8 #message convert expiresOn to expiresIn
 // #8 #message #append the message HTML to the messages div
