Logo CodeGradX
Loading...
The CodeGradX site provides free programming exercises. Among these exercises are those listed below. If interested, join today the CodeGradX community and try to solve these exercises.
You may prefer exercises in other programming languages

Exercises in Javascript for the ``Diffuse JavaScript'' MOOC

Functions and Closures
min3 find the lowest of three numbers
min4 determine the lowest of four numbers
circlefn compute the area of a circle
strcut cut a string in pieces
shuffle Shuffle an array in-place
hash2array Convert an object into an array
invertobject swap properties and values in a object
purify purify an array
histogram Produce an histogram
compose Compose functions
swapfn Create a function with swapped arguments
curry Function curryfication
checkargs check arguments types
toggler Round-robin of 3 functions
memoize Creation of memoized functions
once One-shot function
sumone2n sum(1..n)
Prototypes and Classes
getcolor Add a method
protochain Write a fonction that show the prototype chain
points Memo-class
pointcolore Colorizable points
clone Cloning and inheritance
add-method Adding methods to objects
cascade Combine methods into a cascade
spycount Count invocations
doesnotunderstand Handle unknown methods
singletoner Create a class factory to create singleton classes
Callbacks, Events, Promises, Generators, Workers
countlinelength Count line lengths
syncobj bind two or more objects
cbgcd Compute GCD with callbacks
cbchain Chain some asynchronous computations
completion word completion
delaypromise delayed promise
sequencepromises sequencing promises
anycouple application between promises
crosscheck Compare two computations
gfilter filtering the output of a generator
gmerger Streams Merger
decrypt decrypt password
progress Progressive downloader
Distribution
xmljson HTMLize xml or json data
hello-http-server-fn Write a function creating and starting an http server
clocktick Clock ticker server
counter counting server
dbobject improve DBObject.remove
webapi Enhance an HTTP API
wsapi Enhance a WS API