Message from JavaScript discussions

February 2019

— You can, though

— 

I find it really interesting to see how lack of a compile-time type check affects runtime error handling. In systems like C and C++ you have an easier time handling expected errors and the norm is to return a status code such as 0, then do a comparison against it to see if the operation succeeded.

— It throws automaticly, you only need to set try {...} catch {...} at the very top level to eliminate any unexpected error. Of course if you only handle user input, you have to refine it first.. it's obvious ye, but for tests.. who cares

Message permanent page

— Https://repl.it/repls/ClumsyJuniorConstant

— Which ways are better?

— Ok i had a new approach... https://repl.it/falkyouall/NumberToStringv2?language=javascript&folderId=

Message permanent page

— Was way faster this time

— It varies by language, for instance in C/C++ throwing is inferior to status codes and often make code harder to read

Message permanent page

— In JS builtins throw by default, so you are forced to catch their errors

— Well C has no throwing built in so you would have to implement it, C++ does

— Hi, I have a database connected with django passing its query results to my browser.
I would like to use javascript to graphically display and animate the query results (I want to be able customise data visualization).
Can you point me a tutorial/manual/other resource to begin with?

Message permanent page

— You didn’t specify what kind of visualizations you wanted, I would asume some kind of charts and not 3d things.

For charting I would recommend chart.js (it’s easy to use and flexible enough and has animations built in)
https://www.chartjs.org/docs/latest/

For querying I would recommend fetch
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch

Message permanent page