Skip to content

Mnemonic code to help memorize all built-in functions for the programming language

Notifications You must be signed in to change notification settings

natesire/Johnny-Mnemonic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

memory mnemonic for JS Array

Example of code that helps print out all the functions for a JS Array. This helps me memorize all the functions with a mnemonic.

This is the craft secret

Ray("at", ["at"], 9725);
Ray("flat", ["flat", "map", "flatMap"],                             function(treasure)      { treasure });
Ray("forEach2", ["forEach", "find", "filter"],                      function(lightSaber)    { lightSaber });
Ray("indexOf", ["indexOf", "lastIndexOf", "findIndex"],             function(finger)        { finger});
Ray("pop", ["pop", "slice", "splice"],                              function(watermelon)    { watermelon });
Ray("push", ["push", "unshift", "concat"],                          function(kitty)         { kitty });
Ray("shift", ["shift", "reduce", "reduceRight"],                    function(speed)         { speed });
Ray("some", ["some", "includes", "every"],                          function(inclusive)     { inclusive });
Ray("sort", ["sort", "fill", "every"],                              function(worry)         { worry });
Ray("joinToLocaleString", ["toLocaleString", "join", "toString"],   function(party)         { party });
Ray("values2", ["values", "entries", "keys"],                       function(bedVals)       { bedVals });

Additional Inspiration and Resources

Jordan Harb (Leader in NodeJS and Open Source) came up with an approach on how to categorize mutating methods versus non-mutating which relates to JS's ability to be a great functional programming language as in the style "functional programming".

https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff

About

Mnemonic code to help memorize all built-in functions for the programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published