Skip to main content

Command Palette

Search for a command to run...

Write a function that takes an integer minutes and converts it to seconds.

Published
1 min read
Write a function that takes an integer minutes and converts it to seconds.
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

Write a function that takes an integer minutes and converts it to seconds.

Example

convert(5) ➞ 300

convert(3) ➞ 180

convert(2) ➞ 120

Javascript

function convert(minute){
    return minute*60;
}
let minutes = 5;
console.log(convert(minutes));

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.