date (). toisostring (). Slice (0 10) memberikan hasil yang salah

//Add Z in the end for getting the correct value with local timezone
var a = new Date("June 08, 2018 Z");
var res = a.toISOString().slice(0, 10);
console.log(res);
Annoyed Alligator