Here's a JavaScript solution using sorting and two pointers:

```
function findContentChildren(g, s) {
  g.sort((a, b) => a - b); // Sort children's greed factors in ascending order
  s.sort((a, b) => a - b); // Sort cookie sizes in ascending order
  let i = 0; // Pointer for children's greed factors
  let j = 0; // Pointer for cookie sizes
  let count = 0; // Counter for content children
  while (i < g.length && j < s.length) {
    if (g[i] <= s[j]) { // If the current cookie can satisfy the current child
      count++;
      i++;
      j++;
    } else { // If the current cookie cannot satisfy the current child
      j++;
    }
  }
  return count;
}
```

You can call the function like this: 

```
const g = [1, 2, 3]; // Children's greed factors
const s = [1, 1]; // Cookie sizes
const maxContentChildren = findContentChildren(g, s); // Maximum number of content children
console.log(maxContentChildren); // Output: 1
```

In this example, only one child can be content with the available cookies of size 1.
Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie.

Each child i has a greed factor g[i], which is the minimum size of a cookie that the child will be content with; and each cookie j has a size s[j]. If s[j] >= g[i], we can assign the cookie j to the child i, and the child i will be content. Your goal is to maximize the number of your content children and output the maximum number.

I want a JavaScript solution.