Function Fountain

"There is no function
without fun"

Welcome to 🌟 Function Fountain 🌟! Dive into a world of coding with examples in all major programming languages! 🚀 Whether you’re a beginner or a pro, explore, learn, and elevate your skills with us! 💻 Happy Coding! 🌐

JavaScript

A versatile, high-level programming language primarily used for creating interactive and dynamic websites.

Learn more JavaScript
Java

A class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible, commonly used in web servers and Android app development.

Learn more Java
Swift

A powerful, intuitive programming language developed by Apple for iOS, macOS, watchOS, tvOS, and beyond.

Learn more Swift
JavaScript

calculateSimpleInterest

The calculateSimpleInterest function takes the principal amount, rate of interest, and time as arguments, using the formula `Simple Interest = (Principle amount * Rate * Time) / 100` to return the simple interest.

Learn more
JavaScript

generateNthPrimeNumber

A useful JavaScript function that takes an integer n as an argument and returns the nth prime number.

Learn more
JavaScript

findNthFibonacciNumber

This JavaScript function calculates and returns the Nth term in the Fibonacci sequence, where N is the input to the function.

Learn more
Swift

find-strong-numbers-range

The function ‘find-strong-numbers-range’ accepts two integer parameters, defining a range, and identifies all strong numbers within that range. A strong number is a number in which the sum of the factorials of its digits is equal to the number itself.

Learn more
Swift

find-prime-factors

This function breaks down a given number into its prime factors. Swift's native capabilities allow easy division and modulo operations which makes prime factorization an ideal exercise for Swift.

Learn more
JavaScript

find-median-array

The function takes an array of numbers as its argument and determines the median by sorting the array and choosing the middle value.

Learn more
Java

capitalizeWords

This function receives a string as input and returns a new string where the first character of each word is capitalized. It uses Java's String methods to manipulate the input string.

Learn more
Java

findArmstrongNumbersInRange

This function employs nested loops and conditionals in Java to find all Armstrong numbers within a provided range.

Learn more
Swift

find-average-numbers-range

This Swift function takes in a range of numbers and then calculates the average value of these numbers. It does this by summing up all the numbers in the range and then dividing by the amount of numbers.

Learn more
Java

find-string-length

This function takes a string as input and returns its length. It leverages Java's built-in method length() which returns the count of characters in a string.

Learn more