6 lines
121 B
JavaScript
6 lines
121 B
JavaScript
|
function percentage(num, per)
|
||
|
{
|
||
|
return (num/100)*per;
|
||
|
}
|
||
|
|
||
|
console.log(percentage(1000, 47.12));
|