Conjuncting Javascript Variables with Strings

63

To add a variable mid string in javscript use the plus operator ( + )
Example:

var page;
page = "50";
document.write("Delete Page " + page + "?");

or when used within a function

function confirmDelete(delUrl,page) {
if (confirm("Delete Page " + page + "?")) {
document.location = delUrl;
}
}