Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Recursion factorial exa

Public visualization

Viewing a saved revision (read-only)

51a215f74e194cb99b59f101791b4ac5

Recursion factorial exa

0 stars0🌍 Public
NNita
Last edited Sep 18, 2021
Created on Sep 17, 2021
Forked from D3 Starter

This example demonstrates a recursive factorial calculation using plain JavaScript, displaying the result of factorialize(4)—the value 24—in large, centered text on the page. The code defines a recursive function that multiplies a number by the factorial of its decremented value until reaching zero, logging the answer to the console and rendering it directly in the DOM. It uses D3 v7 only to load the library via a script tag, while the visualization itself relies on standard HTML, CSS, and JavaScript recursion rather than any D3-specific API or data binding.

AI-generated description

A demonstration of how to start using D3 version 6.