js/calc-model.js
/* 
 * Clear user input or result on the screen 
 *  => For user input: clear directly the data in the model.
 *  => For result: only clear the screen, but keep the result in model.
 */
Clear user input or result on the screen
=> For user input: clear directly the data in the model.
=> For result: only clear the screen, but keep the result in model.
Clear user input or result on the screen = > For user input : clear directly the data in the model . = > For result : only clear the screen but keep the result in model .
function clear() {
    if (data.show !== data.accumulator) { 
        data.operands[data.cursor] = ['0'];
        data.show = data.operands[data.cursor];
    } else {
        data.show = 0;
    }
}
function clear ( ) { if ( data . show !== data . accumulator ) { data . operands [ data . cursor ] = [ '0' ] ; data . show = data . operands [ data . cursor ] ; } else { data . show = 0 ; } }
Clear user input or result on the screen
  => For user input: clear directly the data in the model.
Clear user input or result on the screen = > For user input : clear directly the data in the model .
// data.show points to one of the operand