Here’s how you can concatenate a number to a string in JavaScript.

You can concatenate a number to a string using the + operator as shown below.

let example = 'Hello World';

let demo = example + 42; // 'Hello World42'

let reverse = 42 + example; // '42Hello World'

#javascript

How to Concatenate a Number to a String in JavaScript
46.55 GEEK