Code editor says the ** (exponent) operator is an error

Complete the following questions so forum users and Wick Editor developers can give you the best help possible! If the following questions are not completed, your post may be edited or removed.

Describe the bug
The bug is that, although it still works fine when you run it, typing in, for example, 2**2 (which is 2² in javascript), will show an error marker on that line, which could cause problems when trying to debug

To Reproduce
Steps to reproduce the bug, if you have them:

  1. Go to the coding panel
  2. Type in "(any number) ** (any number)
  3. Look at left side of coding panel
  4. See error

Expected behavior
The code editor shouldn’t report that " ** " will cause an error

*Computer Information

  • OS: ChromeOS
  • Device Type: Chromebook
  • Browser Chrome

Do you have a suggested solution to this issue? (ex. has another program fixed this bug a certain way? Are you familiar with where in the code base someone would need to fix this issue?)

Additional context Optional*
Add any other context about the problem here.

1 Like

I think 2**2 works in python and not javascript.
In javascript, it’s Math.pow(A,B) to raise A to the power of B (which is AB).
In this case, Math.pow(2,2) will give you the value of 22, which is 4

no, ** is a valid exponentiation operator
image

it is a problem with the linter

1 Like

Oh sorry, I was wrong :sweat_smile:
The last time I tried a**b was 2 years ago, and since it showed me an error on wick I thought Math.pow(a,b) was the only way to raise a number as an exponent in JS until now :man_facepalming:
2**2 seems much simpler to use than Math.pow(2,2) as well, you’ve just made my life easier!

You’re right, it is probably an issue with the linter
Thanks for correcting me, I really appreciate it!