Nirs Nirs - 1 year ago 96
Javascript Question

jquery map and Date() function

I had this js/jquery function working well with all browsers (to transform a timestamp to a date) but actually safari gives me a console error at the ">" character. Any one knows another way to get the same effect?

var newTimeArray = => new Date(t));

Answer Source

Arrow functions are still fairly new. The old fashioned syntax for this (which should work in all browsers) is

var newTimeArray ={
    return new Date(t);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download