Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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