Modules 6/15


Can someone help me with this code please, why are their curly brackets in this line, in the forEach function? Airplane.availableAirplanes.forEach(function(){});

This is the whole code

import Airplane from ‘./airplane’;

function displayFuelCapacity () {


Never mind, think I have realised why. The curly brackets serve as the body to the newly created forEach function within the variable.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.