CodingTrain / Toy-Neural-Network-JS

Neural Network JavaScript library for Coding Train tutorials
MIT License
425 stars 242 forks source link

a beautiful print method + real error throwing/checking #123

Open arjunpat opened 6 years ago

arjunpat commented 6 years ago

-refactored errors to JavaScript convention -created a beautiful print method (try it in Google Chrome) -cut down if statements and for statements where brackets weren't needed

arjunpat commented 6 years ago

Just wanted to let you know that the error checking breaks the circleci test (but it will not people's code — it makes it MORE failsafe against bad inputs. It also removes the need for an empty return statement as throwing errors automatically breaks the program).

I am submitting code that breaks the test because it is usually more conventional to throw errors in javascript (especially errors that could cause the program to go haywire).

Also, it will break the print test because the new print method does not use console.table().