Skip to content

Found typo in bigo.js #14

@RonSkufca

Description

@RonSkufca

Rob, I discovered a typo in sample-code/theory/bigo.js. The last line under Gauss's trick the variable listItem does not exist. I believe it should be lastItem.

const sumContiguousArray = function(ary){
  //get the last item
  const lastItem = ary[ary.length - 1];
  //Gauss's trick
  return lastItem * (listItem + 1) / 2;
}

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