how to set title dynamically in javascript code example Example: change html title <title>This is the title</title>