xxxxxxxxxx
const helloName = name => `Hello ${name}!`
xxxxxxxxxx
var str1 = "Hello ";
var str2 = "world!";
var res = str1.concat(str2);
// does not change the existing strings, but
// returns a new string containing the text
// of the joined strings.
xxxxxxxxxx
let first_string = 'I am a programmer, ';
let second_string = 'I am indisposable.';
let what_i_said = first_string + second_string;
console.log(what_i_said);
/* OR
*/
let tell_my_boss = first_string.concat(second_string);
console.log(tell_my_boss);
xxxxxxxxxx
const str1 = 'Hello';
const str2 = 'World';
console.log(str1 + str2);
>> HelloWorld
console.log(str1 + ' ' + str2);
>> Hello World
xxxxxxxxxx
var fruit="";
if(true){fruit +="Apple";;}
if(true){fruit +=" + Orange";}
if(true){fruit +=" + Banana";}
if(false){fruit +=" + Mango";}
console.log(fruit);
// Output: Apple + Orange + Banana
xxxxxxxxxx
var dest = new String("");
var src = new String("aze");
var ar = new Array();
ar.push(src);
ar.push(src);
dest = ar.join("");
xxxxxxxxxx
<p id="demo"></p>
<script>
let text1 = "Hello";
let text2 = "world!";
let result = text1.concat(" ", text2);
document.getElementById("demo").innerHTML = result;
</script>
xxxxxxxxxx
-------------------------------------------------------------------------------------------------------------
Autoscaling - Generating Load
-------------------------------------------------------------------------------------------------------------
sudo amazon-linux-extras install epel
sudo yum -y install stress
uptime
sudo stress --cpu 8 -v --timeout 10000s
xxxxxxxxxx
var dest = new String("");
var src = new String("aze");
dest += src + src + src + src + src;