I want to output new Date().getDate()
But getDate() is inside a string
fn = "getDate()"
d = new Date();
// How do I make it work?
console.log(d.fn);
The problem is that I can't use it as it is now.
You can test it on: http://jsfiddle.net/99tayr5b/
Many thanks!