Created
May 20, 2020 16:26
-
-
Save Yrds/17a6cff43c6231c5dbf4e4a90f84b65e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const vect = [1,2,3,4,5]; | |
vect.forEach( vect => console.log(vect)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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