Possibly very simple but I'm not sure how to correctly write the following evaluation and assignment, where I'm trying to assign configuration values to a widget and set a fallback default value if the config isn't set. If it's not possible in the way I'm attempting, I can fall back to an if/else before setting the value. Grateful for any pointers.
console.log(config);
// Outputs
{autoplay: false}
$(el).slick({
// Sets autoplay to true instead of false, as it evaluates it as not null (I think)
autoplay: config.autoplay || true,
// If i set it this way, it works with the correct value as not being evaluated, but then i have no fallback value
//autoplay: config.autoplay
});