Nirs Nirs - 10 months ago 32
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));


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);