JavaScript MCQ Javascript Functions MCQ

⚠ Report ✓ Question Verified Copy Link

Q: What is a higher-order function in JavaScript?  

  • A A function that returns another function
  • B A function that takes another function as an argument
  • C A function that does both of the above
  • D none of these
  • Share this MCQ

  • AIt is used for registering DOM listeners as well as instance DOM manipulation. It is executed once the template has been cloned.
  • BIt runs end-to-end tests that are also written in JavaScript and run with node.
  • CIt is to bind the HTML tags (input, select, textarea) to Angular Application Data.
  • DIt refers to the application model, acts like glue between application controller and the view. It can watch expressions and propagate events.
  • ATrue
  • BFalse
  • A
    
    <select ng-model=""> <option ng-repeat="x in cars">{{x.model}}</option> </select> <h1>You selected: {{}}</h1>
    
  • B
    
    <select ng-model="selectedCar"> <option ng-repeat="x in cars">{{x.model}}</option> </select> <h1>You selected: {{selectedCar}}</h1>
    
  • C
    
    <select ng-model="selectedCar"> <option ng-repeat="x in cars">{{x.model}}</option> </select> <h1>You selected: {{selectCar}}</h1>
    

Learn More MCQ Questions from JavaScript MCQ Javascript Functions MCQ