Skip to content

Commit

Permalink
Update concat.md
Browse files Browse the repository at this point in the history
  • Loading branch information
miparnisari committed Nov 14, 2016
1 parent b310d62 commit adb1be4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions string/concat.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Interpolating variables

Creating an `String` interpolating variables always was a pain.
Creating a `String` interpolating variables was always a pain.

The solution that have [more](https://jsperf.com/concat-vs-plus-vs-join) [perfomance](https://jsperf.com/string-concat-fast/17) is using `+=` operator:
The solution that has [more](https://jsperf.com/concat-vs-plus-vs-join) [perfomance](https://jsperf.com/string-concat-fast/17) is using the `+=` operator:

```js

Expand All @@ -18,7 +18,7 @@ var sayHello = greetings('Kiko')
console.log(sayHello) // => 'Hello Kiko, how are you?'
```

However, nowadays is totally recommended (less code and good perfomance) use template string for this purpose:
However, nowadays it is recommended to use template strings due to implying less code and more perfomance:

```js
function greetings (name) {
Expand Down

0 comments on commit adb1be4

Please sign in to comment.