I have a file that has an extention either:
.doc or .docx
I wanted to link it this way:
document.getElementById("file").innerHTML = "View file sent <a href='../folder/filename" +
(what syntax do I need to add here if I wanted to print which extention file is exist on that folder)
In PHP we can do this
var1 = ".doc";
var2 = ".docx";
var1 ? var1 : var2;
What is the equivalent of this in JavaScript?