function createMessageElement(messageObject) {
    // #8 message properties
    var expiresIn = Math.round((messageObject.expiresOn - Date.now()) / 1000 / 60);

    //console.log(' In createMessageElement messageObject.createdOn: ', messageObject.createdOn.toLocaleString());

    // #8 message element
    return '<div class="message'+
        //this dynamically adds the class 'own' (#own) to the #message, based on the
        //ternary operator. We need () in order to not disrupt the return.
        (messageObject.own ? ' own' : '') +
        '">' +
        '<h3><a href="http://w3w.co/' + messageObject.createdBy + '" target="_blank">'+
        '<strong>' + messageObject.createdBy + '</strong></a>' +
        messageObject.createdOn.toLocaleString() +
        '<em>' + expiresIn+ ' min. left</em></h3>' +

        //Add new shadow of 2px for messages paragraph
        '<p text-shadow:2dp>' + messageObject.text + '</p>' +
        '<button class="accented" >+5 min.</button>' +
        '</div>';
}
/**
 * #8 This function makes an html #element out of message objects' #properties.
 * @param messageObject a chat message object
 * @returns html element
 */
#8 This function makes an html #element out of message objects' #properties.
@param messageObject a chat message object
@returns html element
#8 This function makes an html #element out of message objects ' #properties . @param messageObject a chat message object @returns html element
function createMessageElement(messageObject) {
    var expiresIn = Math.round((messageObject.expiresOn - Date.now()) / 1000 / 60);
    return '<div class="message'+
        (messageObject.own ? ' own' : '') +
        '">' +
        '<h3><a href="http://w3w.co/' + messageObject.createdBy + '" target="_blank">'+
        '<strong>' + messageObject.createdBy + '</strong></a>' +
        messageObject.createdOn.toLocaleString() +
        '<em>' + expiresIn+ ' min. left</em></h3>' +
        '<p text-shadow:2dp>' + messageObject.text + '</p>' +
        '<button class="accented" >+5 min.</button>' +
        '</div>';
}
function createMessageElement ( messageObject ) { var expiresIn = Math . round ( ( messageObject . expiresOn - Date . now ( ) ) / 1000 / 60 ) ; return '<div class="message' + ( messageObject . own ? ' own' : '' ) + '">' + '<h3><a href="http://w3w.co/' + messageObject . createdBy + '" target="_blank">' + '<strong>' + messageObject . createdBy + '</strong></a>' + messageObject . createdOn . toLocaleString ( ) + '<em>' + expiresIn + ' min. left</em></h3>' + '<p text-shadow:2dp>' + messageObject . text + '</p>' + '<button class="accented" >+5 min.</button>' + '</div>' ; }
#8 This function makes an html #element out of message objects' #properties.
#8 This function makes an html #element out of message objects ' #properties .
// #8 message properties //console.log(' In createMessageElement messageObject.createdOn: ', messageObject.createdOn.toLocaleString()); // #8 message element //this dynamically adds the class 'own' (#own) to the #message, based on the //ternary operator. We need () in order to not disrupt the return. //Add new shadow of 2px for messages paragraph