Teaching Newbies since 2014

  • Home
  • Javascript ❤
    • JavaScript
    • Node.js
  • WebDev Tuts
  • screencasts
  • Resources
  • VR & AR
  • Github
  • Twitter
  • YouTube
  • RSS
  • C++
You are here: Home / Archives for ort

February 9, 2020 by: Kauress

forEach( ), sort( ) and filter( ) for newbies

Array Methods JavaScript

forEach() ES6 has introduced the forEach() method which allows you to loop through an array. Arrays as you may already know are of the type ‘object’. In contrast to the string,number,boolean, undefined and symbol types which are primitive data types. For example if we console.log the typeof operator to find the typeof array, objectwill be logged, as seen below: const yummies = [‘Ice-cream’,’Cupcake’,’Donut’,’Cupcake’]; console.log(typeof yummies)//

[ Read More ]

Copyright © 2022 ·Kauress