HTML5+Javascript basic template

When you write or complete a function, write after the arguments of its definition by
"//@@@ work" if you have carefully checked that it works,
"//@@@ does not work" otherwise. Test all the extreme cases. Use your checklist!

Assignment to be sent before Monday 4/12/2017 10:00: see below.


 

Assignment to be sent before Monday 4/12/2017 10:00:
(encode the next functions; make the safety checks and use the functions
  Fct_typeCheck and Fct_error for the error messages
;
  below, "arg" abbreviates "argument", alias, "parameter"):