Took 1 minutes and 30 seconds to code JavaScript abs() method. Here is the code snippet.
Code:
function abs(num) {
num2 = num * -1;
return num2;
}
document.write(abs(-4.7));
Result:
4.7
10xCoderKids is your partner in the journey to become 10x Coder !!!
Good morning, everyone. I'm Saion Gupta, the Founder of 10xCoderKids and the Guinness World Record holder for the youngest computer prog...
No comments:
Post a Comment