A line starting with . , is just a function / property called by the previous function / line object.
In your particular case
Crafty.e("2D, DOM, Text").attr({ w: 100, h: 20, x: 150, y: 120 }) .text("Loading") .css({ "text-align": "center" });
.text("Loading") is just a function call for the result of Crafty.e(...) .
Similarly, .css({ "text-align": "center" }) is just a function call for the result of the previous line .text("Loading") .
Since it is on the same line, the call to .attr(...) not externally visible, but it is the same as the others in its lines.
In extended expressions, the above example matches this:
var eResult = Crafty.e("2D, DOM, Text"); var attrResult = eResult.attr({ w: 100, h: 20, x: 150, y: 120 }); var textResult = attrResult.text("Loading"); var cssResult = textResult.css({ "text-align": "center" });
As others have argued, this is simply a method of chaining calls to the same object, however, remember (!) That this is not always possible in all programming languages. jQuery and many other JavaScript platforms / libraries used this approach to make development easier / smoother, which is why it is widespread in JavaScript development.
In JavaScript, specifically, the statement real is ; (semicolon). This means that a single statement can span multiple lines.