const str = "Hello, JavaScript!";
const o = document.getElementById('output');
o.innerHTML =
'str = "'+str+'"
'+
'.length → '+str.length+'
'+
'.toUpperCase() → '+str.toUpperCase()+'
'+
'.includes("Java") → '+str.includes("Java")+'
'+
'.indexOf("Java") → '+str.indexOf("Java")+'
'+
'.slice(7, 17) → '+str.slice(7,17)+'
'+
'.replace("Hello","Hi") → '+str.replace("Hello","Hi")+'
'+
'.split(", ") → '+JSON.stringify(str.split(", "))+'
'+
'" hello ".trim() → "'+(" hello ").trim()+'"
'+
'"5".padStart(3,"0") → '+("5").padStart(3,"0");