GoConqr has a new look! Let us know what you think.

Flashcards

HIGHER ORDER FUNCTIONZ

ig ag Computer Studies MCAT English 2 cards

Cards in this deck (2)

  1. 1.replace()The replace() method searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced.
    *** str.replace(/blue/g, "red")
    *** str.replace(/,/g, "")
    *** can also take function at end!!!
    var res = str.replace(/blue|house|car/gi, function myFunction(x){return x.toUpperCase();})
  2. 2.filter()filters an array, returns an array where of values that meet a criteria.
    var ages = [32, 33, 16, 40];
    function checkAdult(age) {
    return age >= 18; }
    var result = ages.filter(checkAdult);
    }

Information

Description
MCAT Computer Studies Flashcards on HIGHER ORDER FUNCTIONZ, created by ig ag on 17/09/2016.
Created by
ig ag · Sep 2016
Updated
Sep 19, 2016
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?