When I want to create and use a function what accepts another function in it as an argument I usually do:

```
// Create Function
function doSomething(func){
    func();
}

// Call Function
doSomething(function(){
   ...
});

```

but in javascript(and many other languages what I know) there a default functions such as `if`, `while`, `for`, `function` where there is a different format when I call them:

```
while(i < 10){
    ...
}

```

So this `while` function doesn't have another "parent" function. Is it possible to make my own functions in this style in javascript?