Q:

Concatenation in jQuery

var os = $.client.os; // mac
var browser = $.client.browser; // firefox
var browserversion = $.client.browserversion; // 3
$('#root').addClass( os + browser + browserversion );

.. results in <div id="root" class="macfirefox3">. How do I add spaces between them?

A:

$('#root').addClass( os + " " + browser + " " + browserversion );

A:

Another variation of the same:
$('#root').addClass([
    $.client.os,
    $.client.browser,
    $.client.browserversion
].join(' '));

