I'm writing my first ever jquery dependant plugin.
My question is can default parameters be variable like so:
var s = 400,
m = 500,
l = 700,
xl = 960;
function breakpoints(s = s, m = m, l = l, xl = xl) {
return {
s: s,
m: m,
l: l,
xl: xl
};
};
When using console.log(s, m, l, xl); inside my initial breakpoints() declaration I get the error:
s is not defined
Thanks in advance for your help.