What the Heck Is a [].join``?

What the Heck Is a [].join``?

Template literals can contain placeholders. These are indicated by the dollar sign and curly braces (${expression}). The expressions in the placeholders and the text between the backticks (` `) get passed to a function.

Every javascript developer is familiar (hopefully) with an array join method:

[1, 2, 3].join('')
// "123"

But what about following code?

[1, 2, 3].join`` // (1)
// "123"

As for me the code doesn’t look usual for javascript.

Do you know what is it and how does this construction works?

es6 javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

What is ES6, What is ECMAScript & Why You Should Learn it? – JavaScript ES6 for Beginners

Learn what ES6 is, what ECMAScript is, and why it is important to learn for writing modern JavaScript.

Learn Modern JavaScript ES6 | ES7 | ES8

In this article we are going to Learn Modern JavaScript [ ES6 | ES7 | ES8 ] , so as you know JavaScript is a scripting language that was introduced for

Generator Function JavaScript ES6 | JavaScript Tutorial

In this video we're going to learn about Generator Functions in JavaScript. We'll learn how to define and use a generator function and what is it's advantage. We will also implement a scenario where the generator function can be useful.

The essential JavaScript concepts that you should understand

The essential JavaScript concepts that you should understand - For successful developing and to pass a work interview

JavaScript ES6: Var, Let, and Const || ES6 Variable Declarations Explained

Learn the 2 new keywords that ES6 brings for declaring variables: let & const, when and why to use them instead of the old var keyword. JavaScript ES6: Var, Let, and Const || ES6 Variable Declarations Explained