plus will append not sum tow value in js code example
Example 1: how to add two numbers in javascript
let a = 4;
let b = 5;
document.write(a + b);
Example 2: how to add a variable in js
var x = 5; // assign the value 5 to x
let a = 4;
let b = 5;
document.write(a + b);
var x = 5; // assign the value 5 to x