Hi,
I have this JavaScript code
function mycode(con) {
var date1="feb-9";
var date2="feb-11";
var date3="feb-20";
var getdate = con;
document.write(getdate);
}
This code is supposed to display a specific date depending on the given argument like below:
<script type="text/JavaScript">mycode("date1");</script>
It wont work because all I get is "date1" instead of the value for that variable which should be "feb-9".
What I am doing wrong?