[Solved] How to display a dynamic variable in the title of an html page?


Look over Javascript Basics

Web-crawlers update their indices if your title changes, as a heads-up note.


let variable = "-hello world-";

document.title  = "___/TEXT :: TEXT: " + variable + " \ _________";
console.log(document.title);
/*
OR
document.title  = "___/TEXT :: TEXT: var \ _________";
document.title  = document.title.replace('var', variable);
*/

5

solved How to display a dynamic variable in the title of an html page?