Ahmed's public fiddles
-
compute the value of b^n where n is the exponent and b is the bases
compute the value of b^n where n is the exponent and b is the bases
-
convert an amount of money into cash
convert an amount of money into cash
-
Write a JavaScript function which says whether a number is perfect.
Write a JavaScript function which says whether a number is perfect.
-
function which returns the n rows by n columns identity matrix.
function which returns the n rows by n columns identity matrix.
-
**Additional notes too** Write a JavaScript function which accepts an argument and returns the type.
Write a JavaScript function which accepts an argument and returns the type. Note : There are six possible values that typeof returns: object, boolean, function, number, string, and undefined.
-
function to check whether a number is prime or not
No-Library (pure JS), HTML, CSS, JavaScript
-
find the longest word within a string
find the longest word within a string
-
function that accepts a string as a parameter and converts the first letter of each word of the string in upper case
function that accepts a string as a parameter and converts the first letter of each word of the string in upper case
-
function that generates all combinations of a string
** bit of a funny example because the expected output they gave isn't what their solution would give
-
checks whether a passed string is palindrome or not
checks whether a passed string is palindrome or not
-
find the larger value between the first or last and set all the other elements with that value
find the larger value between the first or last and set all the other elements with that value
-
create a new string using the first and last n characters from a given sting
create a new string using the first and last n characters from a given sting
-
create a string using the middle three characters of a given string of odd length
create a string using the middle three characters of a given string of odd length
-
Divide two positive numbers and return a string with formatted commas
Divide two positive numbers and return a string with formatted commas
-
JavaScript program to convert the letters of a given string in alphabetical order.
JavaScript program to convert the letters of a given string in alphabetical order.
-
Solution* Convert a given number to hours and minutes
Convert a given number to hours and minutes
-
capitalize the first letter of each word of a given string
capitalize the first letter of each word of a given string
-
solution* JavaScript program to reverse a given string
solution* JavaScript program to reverse a given string
-
check if the last digit of a number of given positive integers is same
check if the last digit of a number of given positive integers is same
-
check three given numbers
if the three numbers are same return 30 otherwise return 40 and if two numbers are same return 20