Instantly share code, notes, and snippets.

🎯
Focusing

# Angvish Kumarangvishvish

🎯
Focusing
• Sort options
Created Feb 21, 2015
Have the function DashInsert(str) insert dashes ('-') between each two odd numbers in str. For example: if str is 454793 the output should be 4547-9-3. Don't count zero as an odd number.
View DashInsert.js
 function DashInsert(str) { str = str.split('').map(function (item) { if (item%2 != 0) { return item + "-"; } return item; }).join(''); str = str.split(''); return str[str.length-1]%2 == 0 ? str.join(''): str.join('').substring(0, str.length - 1);
Created Feb 21, 2015
View Mean mode.js

Created Feb 21, 2015
Division Stringified
View Division Stringified .js
 function DivisionStringified(num1,num2) { var result = parseInt(num1/num2); // code goes here return result.toString().split('').length>3 ? parseInt(result/1000)+","+parseInt(result%1000):result; } DivisionStringified(8,8);
Created Feb 20, 2015
Count the number of vowel in javascript
View Vowel count.js
 function VowelCount(str) { var count = str.split('').map(function (item) { return item.match(/[aeiouAEIOU]/) ? item : ''; }).join(''); return count.length; } // keep this function call here // to see how to enter arguments in JavaScript scroll down
Last active Aug 29, 2015
View Factorial.js
 var factorial = function (n) { if(n == 0) { return } return n * factorial(n-1); } factorial(8);
Last active Aug 29, 2015 — forked from jaysonrowe/FizzBuzz.js
View FizzBuzz.js
 var check = function (number) { var fizz = number % 3 == 0, buzz = number % 5 == 0; console.log(fizz ? buzz ? "FizzBuzz" : "Fizz" : buzz ? "Buzz" : number); if (number != 0) { return check(number - 1); } }
Created Feb 20, 2015
Division by 3, 5 and both
View Division
 Document
Last active Aug 29, 2015
Foundation off canvas
View Foundation off canvas
 Foundation
You can’t perform that action at this time.