Coding Master
10.9K subscribers
290 photos
13 videos
220 files
3.13K links
ADMIN : @Coding_Master ๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ผ

Hello guys, I Created This Telegram Channel To Share Useful Content On Web Development & Programming.

๐Ÿ‘‰ Free Ebooks
๐Ÿ‘‰ Free Tools & Resources Links
๐Ÿ‘‰ Free Projects Source Code

So Stay Tuned With Us & Keep Learning ๐Ÿ˜‰
Download Telegram
8 Awesome Projects You Can Build With Vanilla JavaScript ๐Ÿ‘‡๐Ÿ‘‡
Visit our first post on Dev Community๐Ÿ‘‡๐Ÿ‘‡
Don't forget to like & share the post
Write a JavaScript program to compute the absolute difference between a specified number and 19. Returns triple their absolute difference if the specified number is greater than 19.

function diff_num(n) {
if (n <= 19) {
return (19 - n);
}
else
{
return (n - 19) * 3;
}
}

console.log(diff_num(12));
console.log(diff_num(19));
console.log(diff_num(22));
Material Card Design.zip
1.3 KB
Source Code