File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
1-js/06-advanced-functions/09-call-apply-decorators Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -36,19 +36,11 @@ function cachingDecorator(func) {
3636
3737slow = cachingDecorator (slow);
3838
39- <<<<<< < HEAD
40- alert ( slow (1 ) ); // slow(1) est mise en cache
41- alert ( " Again: " + slow (1 ) ); // pareil
42-
43- alert ( slow (2 ) ); // slow(2) est mise en cache
44- alert ( " Again: " + slow (2 ) ); // pareil que la ligne précédente
45- ====== =
46- alert ( slow (1 ) ); // slow(1) is cached and the result returned
47- alert ( " Again: " + slow (1 ) ); // slow(1) result returned from cache
48-
49- alert ( slow (2 ) ); // slow(2) is cached and the result returned
50- alert ( " Again: " + slow (2 ) ); // slow(2) result returned from cache
51- >>>>>> > 7533c719fbf62ba57188d6d51fe4c038b282bd0c
39+ alert ( slow (1 ) ); // slow(1) est mis en cache et le résultat est renvoyé
40+ alert ( " Again: " + slow (1 ) ); // le résultat slow(1) est retourné à partir du cache
41+
42+ alert ( slow (2 ) ); // slow(2) est mis en cache et le résultat est renvoyé
43+ alert ( " Again: " + slow (2 ) ); // le résultat slow(2) est retourné à partir du cache
5244```
5345
5446Dans le code ci-dessus, ` cachingDecorator ` est un * décorateur* : une fonction spéciale qui prend une autre fonction et modifie son comportement.
You can’t perform that action at this time.
0 commit comments