Why the new default in new snippets?
const params = arguments[0];
vs
var params = arguments[0],
$ = skuid.$;
Why the new default in new snippets?
const params = arguments[0];
vs
var params = arguments[0],
$ = skuid.$;
Thanks for the question, Pat. This change was made to be more in line with Javascript best practices and ES6 which included the release of the const and let keywords.
One advantage to using const and letover var is that they are block scoped, so any variables declared using these keywords have less risk of being hoisted by other code in the environment.
You’re welcome to continue using var in your snippets.
Keep in mind a few browsers don’t fully support const (e.g. IE11), but also that Skuid does not support using v2 in IE11, see Skuid Supported Browsers for more information.
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.