I figured it out with this:
var durationIn = myLayers[i].Effects("ADBE Slider Control")
? myLayers[i].Effects("ADBE Slider Control")
: myLayers[i].Effects.addProperty("ADBE Slider Control");
durationIn.name = "IN";
var durationOut = myLayers[i].Effects("ADBE Slider Control")
? myLayers[i].Effects("ADBE Slider Control")
: myLayers[i].Effects.addProperty("ADBE Slider Control");
durationOut.name = "OUT";
But the problem is that the ternary operator just read if the layer has a “Slider Control” and i need it to be specific with “IN” and “OUT” sliders. Sorry for asking so much questions, i’m really newbie with JS.