Why this code doesn't compile and shows an error?



I’m a newbie to Reason. Right now I’m following a course from Lynda.com.
The tutorial I’m following shows an example code which runs for the instructor, but when i use the same code it gives me an error.

I installed bs-platform using npm and the bsb -v command’s output is 7.2.2

Here is the code, which failed to compile with the error shown in the screenshot.


And here is the code (exact same code) wrote by the instructor which compiled and ran.
(I couldn’t include both the screenshots in the question because of the restrictions as a new member to the forum)


Not sure why it worked at all (!)
But change the first line to read as follows:

let calcRewardPoints = (purchases) => {

and it should work fine.


Thank you! :slight_smile: