ErrLookup › TheAlgorithms/JavaScript

TheAlgorithms/JavaScript

Algorithms and Data Structures implemented in JavaScript for beginners, following best practices. · JavaScript · 380 source files

Analyzed at 5c39e87a9a on 2026-08-13. 162 documented errors.

Code / MessageTypeSeverityTags
Grid must be a non-empty array
validation error backtracking, maze, grid, input-validation
Grid must be a square
validation error backtracking, maze, grid, dimension-validation
Grid must only contain 0s and 1s
validation error backtracking, maze, grid, type-coercion
Argument not an Integer
validation error bit-manipulation, type-validation, integer
Provided input is not an array
validation error bit-manipulation, power-set, type-validation, array
Error size should be less than equal to 32
validation error bit-manipulation, power-set, range-validation, performance
LFUCache ERROR: The Capacity is 0
validation error cache, lfu, capacity, input-validation
Invalid capacity
validation error cache, lru, capacity, constructor, type-validation
Capacity should be greater than 0
validation error cache, lru, capacity, range-validation
Rule must be an integer between the values 0 and 255 (got ${
validation error cellular-automata, rule-validation, type-validation, integer
Coefficient a, b should be number
validation error cipher, affine, type-validation, coefficient
Argument str should be String
validation error cipher, affine, type-validation, string
${a} is not coprime of 26
validation error cipher, affine, math, coprime, modular-inverse
Argument should be string
validation error cipher, atbash, type-validation, string
Arguments are invalid
validation error cipher, caesar, type-validation, range-validation
Both keyword and message must be specified
validation error cipher, keyword-shifted, input-validation, required-argument
Invalid keyword!
validation error cipher, keyword-shifted, input-validation, bug, duplicate-characters
Argument should be string
validation error cipher, rot13, type-validation, string
Arguments type are invalid
validation error cipher, xor, type-validation, integer
Only string arguments are allowed
validation error type-validation, string, base-conversion, typeof, conversions
Duplicate characters in character set are not allowed
validation error validation, base-conversion, unique-keys, charset, conversions
Not a valid character: ${digit}
validation error validation, base-conversion, charset, out-of-range, conversions
Argument is not a string type
validation error type-validation, string, hex, typeof, conversions
Argument is not a valid HEX code!
validation error validation, hex, regex, input-sanitization, conversions
Invalid hex string.
validation error validation, hex, regex, case-sensitivity, conversions
Invalid units
validation error validation, units, length, lookup, conversions
argument is not a Number
validation error type-validation, rgb, color, typeof, conversions
Argument is not a string.
validation error type-validation, string, time, typeof, conversions
Input is not a valid RGB color.
validation error validation, rgb, hsl, color, range-check, conversions
hue should be between 0 and 360
validation error validation, hsv, rgb, color, range-check, conversions
saturation should be between 0 and 1
validation error validation, hsv, rgb, color, range-check, conversions
value should be between 0 and 1
validation error validation, hsv, rgb, color, range-check, conversions
red should be between 0 and 255
validation error validation, rgb, hsv, color, range-check, conversions
green should be between 0 and 255
validation error validation, rgb, hsv, color, range-check, conversions
blue should be between 0 and 255
validation error validation, rgb, hsv, color, range-check, conversions
Index Out of Bound
validation error validation, range-check, index, quickselect, data-structures, off-by-one
Index is out of range max ${this.length}
exception error data-structures, linked-list, range-error, index-bounds, circular-list
Out of Range index
exception error data-structures, linked-list, range-error, index-bounds
Queue is Empty
exception error data-structures, queue, empty-state, fifo
Stack Underflow
exception error data-structures, stack, underflow, lifo
Cannot normalize vectors of length 0
exception error math, vector, divide-by-zero, geometry
Input should be integer
exception error dynamic-programming, fibonacci, type-error, integer-validation
Input should be integer
exception error dynamic-programming, fibonacci, type-error, integer-validation
Improper string encoding
exception error dynamic-programming, date-parsing, input-format, calendar
Triplet cannot exist with the given array
exception error dynamic-programming, array, input-size, product
The sum must be non-negative.
exception error dynamic-programming, subset-sum, validation, non-negative
All of the inputs of the array must be positive.
exception error dynamic-programming, subset-sum, validation, positive-integers
Input data must be type of Array
exception error dynamic-programming, grid, type-guard, input-shape
Minimum of 3 points is required to form closed polygon!
exception error geometry, convex-hull, input-size, polygon
Argument is NaN - Not a Number
exception error math, abs, type-error, nan, input-coercion
Input cannot be Negative
exception error math, aliquot-sum, type-error, negative-input
Input cannot be a Decimal
exception error math, aliquot-sum, type-error, integer-validation
Invalid Triangle sides.
exception error geometry, validation, triangle-inequality, input-validation
The ${paramName} should be type Number
exception error type-check, input-validation, numeric, typeof
The ${paramName} only accepts non-negative values
exception error validation, numeric, negative-value, geometry
Type of n must be number
exception error type-check, input-validation, numeric, automorphic
n cannot be a floating point number
exception error validation, integer, numeric, floating-point
Invalid Input
exception error type-check, array, input-validation, statistics
Array is empty
exception warning validation, empty-array, statistics, edge-case
Argument is not a number.
exception error type-check, input-validation, numeric, krishnamurthy
Invalid input, please pass only numbers
exception error type-check, input-validation, numeric, range
Invalid number range, please provide numbers such that num1
exception warning validation, range, ordering, numeric
Unsupported base. Must be in range [2, 10]
exception error range-error, numeric-base, input-validation, radix
Input is not a valid 2D matrix.
exception error validation, matrix, array, linear-algebra, input-validation
Square matrix is required.
exception error validation, matrix, square-matrix, linear-algebra
Invalid Input
exception error type-check, input-validation, numeric, taylor-series, nan
Not a Number
exception error type-check, input-validation, numeric, gcd, number-theory
Index out of range
exception error validation, array, index-out-of-bounds, recursion, off-by-one
Array is empty
exception warning validation, variadic, empty-input, array, edge-case
The two parameters must be distinct, non-null integers
exception error validation, number-theory, integer, input-validation, friendly-numbers
Arguments must be numbers
exception error type-check, input-validation, numeric, gcd, number-theory
Number must be greater than zero.
exception error math, input-validation, precondition, figurate-numbers
Input data must be numbers
exception error math, type-check, input-validation, base-conversion
Expected a valid real number
exception error math, input-validation, type-guard, number-theory
Number must be greater than zero.
exception error math, number-theory, precondition, prime-factorization
Number must be greater than zero.
exception error math, number-theory, precondition, prime-factorization
Index cannot be Negative
exception error math, precondition, index-validation, sequence
Index cannot be a Decimal
exception error math, precondition, type-validation, sequence
imageWidth should be greater than zero
exception error math, rendering, precondition, fractal
imageHeight should be greater than zero
exception error math, rendering, precondition, fractal
maxStep should be greater than zero
exception error math, rendering, precondition, fractal
Invalid Input
exception error math, statistics, type-check, input-validation
Argument must be an Array
exception error math, statistics, type-check, input-validation
The two lists must be of equal length
exception error math, statistics, input-validation, ml
Expected integer N and finite a, b
exception error math, calculus, type-validation, numerical-integration
Number must be greater than zero.
exception error math, number-theory, precondition, prime-factorization
Modulus must be initialized in the object constructor
exception error math, object-state, precondition, modular-arithmetic
Input must be Numbers
exception error math, type-check, input-validation, modular-arithmetic
Argument is not a number.
exception error math, type-check, input-validation, number-manipulation
Input is not a valid 2D matrix.
exception error math, linear-algebra, input-validation, matrix
Expected integer N and finite a, b
exception error math, calculus, type-validation, numerical-integration
Expected a number, received ${typeof num}
exception error type-validation, math, input-validation, newton-method
Expected a number, received ${typeof precision}
exception error type-validation, math, optional-parameter, default-parameter
Input data must be numbers
exception error type-validation, math, binary-search, nan-pitfall
The geometric progression is diverging, and its sum cannot b
exception error math, domain-validation, infinite-series, convergence
The ${noName} should be Number type
exception error type-validation, math, geometry, shared-helper
The ${noName} only accepts positive values
exception error range-validation, math, geometry, positive-value
Arguments are not all numbers.
exception error type-validation, date, calendar, zellers-congruence
Input must be a integer number
exception error type-validation, math, palindrome, misleading-message
The value of latitude or longitude should be a number
exception error type-validation, navigation, geo, haversine
No natural numbers exist below 1
exception error range-validation, project-euler, math, natural-number
Fibonacci sequence limit can't be less than 1
exception error range-validation, project-euler, math, fibonacci
Invalid Input
exception error range-validation, project-euler, primes, generic-message
Invalid input, please provide valid number
exception error input-validation, project-euler, parse-pitfall, loose-check
Please provide number greater that 1
exception error range-validation, project-euler, typo-message, boundary
Invalid Input
exception error range-validation, project-euler, amicable-numbers, generic-message
Dimension must be odd
exception error range-validation, project-euler, parity, spiral
Dimension must be positive
exception error range-validation, project-euler, positive-value, nan-pitfall
Invalid input
exception error range-validation, project-euler, primes, circular-primes
Invalid Input
exception error range-validation, project-euler, pentagonal-numbers, generic-message
Input should be a non-negative whole number
exception error range-validation, recursion, math, integer-only
location should point to a pixel within the rgbData
exception error bounds-check, image-processing, flood-fill, input-validation
canvasWidth should be greater than zero
exception error input-validation, geometry, canvas, positive-number
Invalid Input
exception error type-check, string, recursion, input-validation
Invalid Input
exception error type-check, array, dynamic-programming, input-validation
Invalid arguments
exception error bounds-check, search, quickselect, input-validation
key has to be a function or else left undefined
exception error type-check, union-find, constructor, input-validation
Index out of bounds. The maximum index can be length-1
exception error bounds-check, union-find, off-by-one, input-validation
Subarray size k must be between 1 and the length of the arra
exception error range-check, sliding-window, input-validation
Please input a valid list or array.
exception error type-check, sort, recursion, input-validation
Given input is not an array
exception error type-check, sort, input-validation
One of the items in your array is not a number
exception error type-check, sort, numeric, input-validation
Argument should be string
exception error type-check, string, palindrome, input-validation
Both arguments should be strings.
exception error type-check, string, anagram, input-validation
Argument is not a string.
exception error type-check, string, naming-convention, input-validation
Argument is not a string
exception error type-check, string, ascii, input-validation
Argument is not a string.
exception error type-check, string, naming-convention, input-validation
Argument is not a string.
exception error type-check, string, naming-convention, input-validation
The given value is not a string
exception error type-check, string, pangram, regex, input-validation
Argument is not a string.
exception error string, validation, type-guard, naming-convention
Argument is not a string.
exception error string, validation, type-guard, naming-convention
The first param should be a string
exception error string, validation, type-guard, word-count
The second param should be a boolean
exception error string, validation, type-guard, boolean, word-count
Input should be a string
exception error string, validation, type-guard, letter-count
Input must not contain special characters
exception error string, validation, regex, letter-count, ascii-only
Input must not contain numbers
exception error string, validation, regex, letter-count, ascii-only
Argument should be string
exception error string, validation, type-guard, substring, ambiguous-message
Input should be a string
exception error string, validation, type-guard, vowels
Argument should be string
exception error string, validation, type-guard, unique-character
Invalid phone number!
exception error string, validation, phone-number, formatting, coercion-bug
Strings must be of the same length
exception error string, validation, hamming-distance, length-mismatch
Input must be a string or a number
exception error string, validation, type-guard, palindrome, number
Invalid Input Type
exception error string, validation, type-guard, sliding-window, substring
Invalid Input Type
exception error string, validation, type-guard, lowercase, unicode-caveat
Argument should be a string
exception error string, validation, type-guard, max-character
The param should be a nonempty string
exception error string, validation, empty-input, max-character
the param should be string
exception error string, validation, type-guard, word-count, default-arg
Given input is not a string
exception error string, validation, type-guard, pattern-matching, ambiguous-message
Input data must be strings
validation error string, validation, type-guard, percentage, nan-risk
The arg must be a valid, non empty string
validation error string, validation, type-check, input-validation
The given value is not a string
validation error string, type-check, validation, input-validation
The given value is not a string
validation error string, type-check, validation, input-validation
Argument should be string
validation error string, type-check, validation, ascii
The given value is not a string
validation error string, validation, credit-card, type-check, input-validation
${creditCardString} is an invalid credit card number because
validation error string, validation, credit-card, sanitization, input-validation
${creditCardString} is an invalid credit card number because
validation error validation, credit-card, business-rule, input-validation
${creditCardString} is an invalid credit card number because
validation error validation, credit-card, business-rule, issuer-detection
${creditCardString} is an invalid credit card number because
validation error validation, credit-card, luhn, checksum, business-rule
Email Address String Null or Empty.
validation warning string, validation, email, type-check, input-validation
Invalid Month Number.
validation error date, validation, off-by-one, type-check, input-validation
Invalid day value.
validation error date, validation, business-rule, input-validation
Invalid date format. Please use 'dd/mm/yyyy'.
validation error date, validation, format, regex, input-validation