Question 1. Joined Logger
Question 2. Step Counter
you are provided with implementation of a simple counter object
const counter = (function counter(){
let value = 0;
return {
getValue: function(){
return value;
},
changeBy:function(k){
value += k;
},
}
})();
//Your task is to implement a function step Counter that:
takes a single parameter k
retrn a new obj representing a step counter with initial value of 0 with
three methods:
increment(): increments the current value by k
decrement(): decrement the current value by k
getvalue(): returns the current value
Auf dieser Seite können Sie das Online-Video JavaScript (Basic) Certificate Questions with solution source code mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer SUVANSH BADONI 16 Juni 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,607 Mal angesehen und es wurde von 11 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!