tracker issue : CF-4207970

select a category, or use search below
(searches all categories and all time range)
Title:

Array find() member function doesn't work on literals

| View in Tracker

Status/Resolution/Reason: Open//

Reporter/Name(from Bugbase): Mark B. / ()

Created: 04/10/2020

Components: Language, Member Functions

Versions: 2018

Failure Type:

Found In Build/Fixed In Build: update 8 /

Priority/Frequency: Normal /

Locale/System: / Platforms All

Vote Count: 0

Problem Description:
The member function "find()" does not work when executed against a literal array.

Steps to Reproduce:
["apples", "oranges", "bananas"].find("oranges")

Actual Result:
An error is thrown

Expected Result:
I would expect to get back the value "2"

Any Workarounds:
var fruits = ["apples", "oranges", "bananas"];
fruits.find("oranges")

Attachments:

Comments: