Skip to content

Instantly share code, notes, and snippets.

@Yrds
Created May 20, 2020 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yrds/17a6cff43c6231c5dbf4e4a90f84b65e to your computer and use it in GitHub Desktop.
Save Yrds/17a6cff43c6231c5dbf4e4a90f84b65e to your computer and use it in GitHub Desktop.
const vect = [1,2,3,4,5];
vect.forEach( vect => console.log(vect));
#include <iostream>
#include <algorithm>
#include <vector>
int main (){
std::vector<int> vect {1,2,3,4,5};
std::for_each(vect.begin(), vect.end(), [](int number){ std::cout << number << std::endl;});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment