Solution using Javascript
IntuitionCheck the condition which are failed to make bugers and return empty arrayApproachFind the small and burgers and jumbo burgers count based on the slice
# Intuition
Check the condition which are failed to make bugers and return empty array

# Approach
Find the small and burgers and jumbo burgers count based on the slices

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```javascript []
/**
 * @param {number} tomatoSlices
 * @param {number} cheeseSlices
 * @return {number[]}
 */
var numOfBurgers = function(tomatoSlices, cheeseSlices) {
  if(cheeseSlices * 2 > tomatoSlices)
    return [];
    if(tomatoSlices % 2 == 1)
        return [];
    if(tomatoSlices == 0 && cheeseSlices == 0)
        return [0,0]
    const maxsmallburger = tomatoSlices / 2;
    const jumboburger = maxsmallburger - cheeseSlices;
    const smallburger = maxsmallburger - jumboburger * 2;
    return smallburger >=0 ? [jumboburger,smallburger] : []

};
```
['JavaScript']