Topic: Why in js .concat([...this.options. ?
adstrategy pro asked 5 years ago
Hello,
I came across an MDBootstrap error on Internet Explorer on the file mdb.min.js. This file contains the following code:
var fas = $nativeSelectChild.data('fas') ? " ") : ''; var far = $nativeSelectChild.data('far') ? " ") : ''; var fab = $nativeSelectChild.data('fab') ? " ") : '';
Why do you use .concat([...this.options ?
Correcting as follows .concat([this.options this works on IE 11.
Thank you,
Regards,
Mikołaj Smoleński staff answered 5 years ago
Hi there,
We use it, because there's a possibility that this.options could be an array. This syntax is called spread operator and is very helpful in such situations.
Best regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.8.4
- Device: Desktop
- Browser: Internet Explorer 11
- OS: Windows 10
- Provided sample code: No
- Provided link: No