# Recursive Multiplication

Developer
Size
2,119 Kb
Views
58,696

## How do I make an recursive multiplication?

Challenged to do multiplication without using *. What is a recursive multiplication? How do you make a recursive multiplication? This script and codes were developed by Steven on 24 September 2022, Saturday.

Recursive Multiplication Previews

## Recursive Multiplication - Script Codes HTML Codes

``````<!DOCTYPE html>
<html >
<body> <script src="js/index.js"></script>
</body>
</html>
``````

## Recursive Multiplication - Script Codes JS Codes

``````"use strict";
// Or some recursion perhaps
// Less lazy, handled signs. Feels like I'm missing a trick though.
function mult(x, y) { var resultSign = x < 0 ? // x less than zero y > 0 ? -1 : 1 : // x greater than zero y < 0 ? -1 : 1; x = volvAbs(x); y = volvAbs(y); function doMult(x, y) { if (y === 0) return 0; // End recursion return x + doMult(x, y - 1); } return resultSign === 1 ? doMult(x, y) : -doMult(x, y);
}
function volvAbs(x) { // Stupid negatives return x < 0 ? -x : x;
}
console.clear();
console.log(mult(6, 7)); // 42
console.log(mult(-6, 7)); //-42
console.log(mult(6, -7)); //-42
console.log(mult(-6, -7)); // 42``````
 Developer Steven Username volv Uploaded September 24, 2022 Rating 3 Size 2,119 Kb Views 58,696
Do you need developer help for Recursive Multiplication?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories.

Steven (volv) Script Codes
 Name Size Weather 4,445 Kb Heavy Snake - Level Editor - Dev 5,348 Kb A Pen by Steven 2,755 Kb Pomodoro 3,539 Kb Wiki Viewer 3,476 Kb JQuery Ajax 1,690 Kb Zelda 15,850 Kb Midas Odds 6,237 Kb Nested Loops 2,231 Kb Roman Numerals 2,518 Kb
Create amazing web content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows.