Skip to main content

Command Palette

Search for a command to run...

Calculate Power

Published
1 min read
Calculate Power
D

I am a Web Developer from Birtamode 1 Jhapa Nepal. As of 2022 i have 3 years of experience in CSS and 1 year of experience in Javascript + 6 Months of Experince in Node.js

Create a function that takes voltage and current and returns the calculated power.

Examples

circuitPower(230, 10) ➞ 2300

circuitPower(110, 3) ➞ 330

circuitPower(480, 20) ➞ 9600

Notes

Requires basic calculation of electrical circuits (see Resources for info).

Javascript

function convert(a,b) {
    return  a*b;
}
let current=100, voltage = 34;
console.log("The Power is",convert(current,voltage));

More from this blog

D

Dipesh Murmu

46 posts

A Full-Stack Laravel Developer with expertise in HTML, CSS, JavaScript, Tailwind, and core PHP. Leveraging the power of Laravel, I specialize in creating dynamic and responsive web applications.