Skip to content

UnexpectedKeyword(Else) #38

@caracal7

Description

@caracal7

test.js

const fib = n => {
  if(n <= 1) {
    return n;
  } else {
    return fib(n - 1) + fib(n - 2);
  }
}

console.log(fib(10));


let a = "hello world";
a;

result

Hello
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnexpectedKeyword(Else)', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions