trekhleb / javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
MIT License
188.28k stars 30.25k forks source link

More detailed instructions on how to run the code for beginners #546

Open honavar-sohan opened 4 years ago

honavar-sohan commented 4 years ago

Hi

I think there should a sample snippet in playground.js to show how to run the scripts.

i am running it like this

// Place your playground code here.

import BubbleSort from "../algorithms/sorting/bubble-sort/BubbleSort"

const b = new BubbleSort()
const r = b.sort([99, 9, 999])
console.log(r)

&

node --es-module-specifier-resolution=node playground/playground.js

my node version v14.12.0

Pls, let me if this is the right way to test out the scripts in playgroud.

If yes I would also like to update the README.md to mention the same.

Pls let me know your thoughts

Thanks

3642066 commented 3 years ago

can run on chrome? why no html files? i develop for long itme, but i still avoiding the node. whats node? where the hell is that comand line console i use to see mentioned frequently? there is no other way??? is that open sourced?