{{ searchForm . total }} results found
Page {{ searchForm . pagination . currentPage }}/{{ searchForm . pagination . lastPage }}

{{ searchForm . message }}

javascript code examples

Prime number checker

A code Example that shows how to write a recursive function to print prime numbers usinf javascript in HTML.

Dynamic html in javascrit

This code example shows how to create dynamic HTML elements in JavaScript. Download the and preview it with web browser

Random color generator

See how to create random colors in javaScript using Math.random and creating dynamic DOM elements to render the colors.

Searching algorithms

This program shows how to use searching algorithm such as linear and binary search in JavaScript. We created a nice table that displays country names and their indices obtained from an array named ...

Photo gallery

This code example shows how to write a simple script to manage a photo gallery. The essence of the code is to write a vanilla javascript code without using any library or framework to accomplish the...

Javascript set and map collections

This code example shows how to use the Set and Map collections in JavaScript. The code allows the use to observe the behavior by adding,deleting,removing and finding items in the collection.

Vanilla javascript image carousel

This code example shows how to write a simple image carousel in vanillajs. An image carousel is a collection of hidden images in a div element which are shown one at a time by sliding in the current ...

Simple slideshow demo

This code example shows how to create a simple slideshow that has next and previous button which allows the user to switch back slides.

Upload multiple files in php and javascript part 1

This code allows the user to upload a single file or multiple files by exploiting the new JavaScript APIs such xhr2, formData and many others.

Using arrow functions to create a simple table

This code example shows how to declare arrow functions in JavaScript ES6 by creating a dynamic table that displays random numbers.