Search⌘ K

Playing Around With Strings

Explore string operations in JavaScript including concatenation and immutability. Understand automatic type casting and master converting strings to integers and floats using parseInt and parseFloat methods for practical coding tasks.

Concatenating strings

A string is basically a series of characters. Let’s perform some operations on strings.

Node.js
console.log('Javascript in ' + 'Practice')

The + concatenates strings. Concatenation means that you join the contents of two strings one after the other.

Strings are immutable, which means that their value cannot be changed. When concatenating two strings, the result is saved in a third-string. ...