Last active
November 23, 2019 23:16
-
-
Save Giagnus64/82db67c033d47c16487eb54761b547cf to your computer and use it in GitHub Desktop.
This file contains hidden or 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 num1 = 10 | |
| const arr1 = [1,2,3] | |
| const isit10 = (num) => { | |
| if(num = 10){ | |
| return true | |
| } else { | |
| return false; | |
| } | |
| } | |
| //isit10(num1) => true | |
| const add1 = (num) => { | |
| return num + 1 | |
| } | |
| //add1(num1) => 11 | |
| const doubleArray = (arr) => { | |
| for(i = 0; i < arr.length; i++){ | |
| arr[i] *= 2 | |
| } | |
| } | |
| //doubleArray(arr1) => [2,4,6] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment