DeveloperBreeze

Javascript Functions Development Tutorials, Guides & Insights

Unlock 4+ expert-curated javascript functions tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your javascript functions skills on DeveloperBreeze.

Non-Primitive Data Types (Objects, Arrays, and Functions)

Tutorial December 11, 2024
javascript

  • Primitives hold a single value and are immutable.
  • Non-primitives hold collections or behaviors and are mutable.

Example:

JavaScript Tutorial for Absolute Beginners

Tutorial September 02, 2024
javascript

Conditional statements allow you to perform different actions based on different conditions.

let score = 85;

if (score >= 90) {
  console.log("A");
} else if (score >= 80) {
  console.log("B");
} else if (score >= 70) {
  console.log("C");
} else {
  console.log("D");
}

Understanding call, apply, and bind in JavaScript

Tutorial August 30, 2024
javascript

However, there are situations where you might want to control or change the value of this, and that's where call, apply, and bind come into play.

The call method allows you to invoke a function with a specified this value and arguments passed individually.

JavaScript Utility Libraries Cheatsheet

Cheatsheet August 21, 2024
javascript

<table>
  <tr>
    <th>Function</th>
    <th>Description</th>
    <th>Example</th>
  </tr>
  <tr>
    <td><code>R.compose(...functions)
    Composes functions from right to left.
    R.compose(Math.abs, R.add(1))(-5) => 4
  
  
    R.curry(fn)
    Returns a curried version of the provided function.
    R.curry((a, b) => a + b)(1)(2) => 3
  
  
    R.filter(predicate, list)
    Returns a new list containing only the elements that satisfy the predicate.
    R.filter(x => x % 2 === 0, [1, 2, 3, 4]) => [2, 4]
  
  
    R.map(fn, list)
    Applies the function to each element of the list.
    R.map(x => x * 2, [1, 2, 3]) => [2, 4, 6]
  
  
    R.reduce(reducer, initialValue, list)
    Reduces the list to a single value using the reducer function.
    R.reduce(R.add, 0, [1, 2, 3]) => 6
  

Date-fns is a modern JavaScript date utility library that provides over 200 functions for manipulating dates without modifying native JavaScript objects.