Grokking Data Structures & Algorithms for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
Moshe Peretz
IDE dont recognize isEmpty function in javascript

Moshe Peretz

Nov 20, 2024

i wrote "while(queue.isEmpty())" but its show me runtime erorr that isEmpty is not function

1

0

Comments
Comments
Jack Hendry
Jack Hendrya year ago

I got the same thing using JS. Uncommenting the queue class inorder to use it's methods provides me this error when I run the test cases.

file:///box/DriverCode.mjs:71 class Queue {

SyntaxError: Identifier 'Queue' has already been declared at ModuleLoader.mod...

Satya Patra
Satya Patraa year ago

Facing the same issue.

tai
tai 10 months ago

If you're on JS, they're literally just using an array - not sure why they would put an entire queue class in the comments if you're not meant to use it at all? another question that could use a rework. I imagine they were supposed to use the provided Queue data structu...

Design Gurus
Design Gurus10 months ago

Sorry for the inconvenience. This was an issue on the server side. It is resolved now.

On this page