Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

array.includes()

ANSWERED

Just got a message: Unhandled exception: TypeError: Expected a function.

on: if ( !bestandenlijst.includes(file) ) doThis();

file="2.png"

bestandenlijst = ["1.png","2.png", "3.png","4.png","5.png"]

 

Doesnt fitbit understand the function includes()

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes?reti...

Community Council MemberMario Dings | Rotterdam NL
Fitbit: Versa, Versa2, Sense. (Versa light) - Phone: Android. - Developer clockfaces.(Nederlands)
Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Fitbit only supports everything in ES5.1, with some extensions. I think .includes() may have been introduced into JS after ES5.1.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
4 REPLIES 4

Hi @MarioDings 

 

Are you developing an application using the Fitbit Web API or Fitbit Device SDK?

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Gordon, 

I use the Fitbit Device SDK (Studio)

 

I'm autodidact, so I try everything I find in a diversity of courses.

Also tried console.table(..) but that is not documented, so no problem.

Community Council MemberMario Dings | Rotterdam NL
Fitbit: Versa, Versa2, Sense. (Versa light) - Phone: Android. - Developer clockfaces.(Nederlands)
Best Answer
0 Votes

Thank you for clarifying.    I'm moving this post to the SDK community.   Someone there should be able to help you.

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer

Fitbit only supports everything in ES5.1, with some extensions. I think .includes() may have been introduced into JS after ES5.1.

Peter McLennan
Gondwana Software
Best Answer