DEV Community

Discussion on: How to create a Stack using JavaScript

shane325 profile image
Shane Barry

You can turn your empty() method into a one liner

empty() {
     return === 0;
Enter fullscreen mode Exit fullscreen mode
jrestrepo922 profile image
Juan Restrepo Author

Will be using this from now on. Thanks, Shane.