Execute Code module - how it works?

Support
  • Main/Tools/Execute code - how it actually works?

    I see it works sometimes with very easy javascript logic, but it failed to do filter/push etc, works fine with devtools, but failed to understand what type of javascript works here always.

    const str = [120, 121];
    const match = [];
    
    for (let i = 0; i < str.length; i++) {
      if (str[i] === 120 || str[i] === 121) {
        match.push(str[i]);
      }
    }
    
    log(match); // Output: [120, 121]
    
    SyntaxError: Parse error during execution of action
    

    any guideline will be better?

    Thanks

  • @nabil said in Execute Code module - how it works?:

    Main/Tools/Execute code - how it actually works?

    I see it works sometimes with very easy javascript logic, but it failed to do filter/push etc, works fine with devtools, but failed to understand what type of javascript works here always.

    const str = [120, 121];
    const match = [];
    
    for (let i = 0; i < str.length; i++) {
      if (str[i] === 120 || str[i] === 121) {
        match.push(str[i]);
      }
    }
    
    log(match); // Output: [120, 121]
    
    SyntaxError: Parse error during execution of action
    

    any guideline will be better?

    Thanks

    Don't use "let". The BAS uses an implementation that supports the ECMA-262 standard.

  • RECAPTCHA SOLVING NOT WORKING

    Support
    0 Votes
    4 Posts
    984 Views
  • Question about source code

    Support
    0 Votes
    4 Posts
    974 Views
  • 0 Votes
    1 Posts
    583 Views
  • SMS Code Never Received

    Support
    0 Votes
    7 Posts
    1179 Views
  • Sometimes execute, sometimes skip

    Support
    0 Votes
    4 Posts
    911 Views