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
Swift

Reverse String in Swift

The function accepts a string and returns its reverse. Useful in diverse programming scenarios like palindrome checking, reverse sorting etc.

Learn more
JavaScript

removeArrayDuplicates

This JavaScript function takes an array as argument and returns a new array that doesn't contain any duplicate values.

Learn more
JavaScript

calculateVolumeTriangularPrism

This function calculates the volume of a triangular prism given the base, height and length of the prism.

Learn more
Java

DivideTwoNumbers

This Java function takes in two numbers as input and returns the result of their division.

Learn more
Java

calculate-time-taken

This function calculates the time difference in Java. Quite useful in tracking the time taken for executing a procedure or code.

Learn more
Java

Find Strong Numbers in Range

This Java function takes in a range as input, and returns all the strong numbers within this range. A strong number is a number in which the sum of the factorial of its digits is equal to the number itself.

Learn more
Swift

findStringLenght

This program demonstrates how to find the length of a string in Swift. It introduces the '.count' property used on strings to retrieve their length.

Learn more
Java

findSquareRoot

The function takes in a number as input, and using the java.lang.Math.sqrt() method, it returns the square root of the given number.

Learn more
Swift

find-perimeter-pentagon

The function 'find-perimeter-pentagon' takes a given length of one side of a pentagon as an input and calculates the perimeter by multiplying it by 5.

Learn more
Swift

Find-nth-Fibonacci-Number

The function calculates the Fibonacci sequence up to the nth number. The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones.

Learn more