Tag: function
Callback vs Promise in JavaScript
JavaScript, being single-threaded, relies heavily on asynchronous programming to handle tasks that may take time, such as making API calls, reading files, or waiting for user input. Historically, c...
Async and Await in JavaScript
JavaScript is single-threaded and asynchronous by nature, which means tasks can run in the background without blocking the main thread. Prior to ES2017, asynchronous code was mainly handled using c...
Promises in JavaScript
JavaScript's Promise is a powerful feature that makes handling asynchronous operations simpler and more readable. Promises allow developers to work with asynchronous code in a more organized way, a...
Callbacks in JavaScript
In JavaScript, functions are treated as first-class citizens, meaning they can be passed around as arguments to other functions, returned from other functions, and assigned to variables. This is th...
C program to find reverse of a number using recursion
Learn how to write a C program to find the reverse of a number using recursion. This guide covers the concept of recursion, a detailed algorithm, and complete code examples.
C program to check if a number is palindrome using recursion
Discover how to write a C program to check if a number is a palindrome using recursion. This article provides an explanation of palindromes, a recursive algorithm, and complete code examples.
C program to get nth Fibonacci term using recursion
Learn how to write a C program to find the nth Fibonacci term using recursion. This article explains the Fibonacci sequence, recursive approach, and provides complete code examples for calculating ...
C Program to Return Multiple Values from a function
Learn how to return multiple values from a function in C using pointers, structures, and arrays. This comprehensive guide includes step-by-step instructions, example code, and detailed explanations...
Decorators in Python: Extending functionality of a function
Decorators are one of the most powerful concepts in python. A decorator is a function which takes another function or wraps a function to improve the behaviour of that function.
Generators in python: How to use Generators and yield in Python
A generator is a function which is responsible to generate a sequence of values. It can be written like a regular function, but it uses the yield keyword.