Skip to content

Instantly share code, notes, and snippets.

@Giagnus64
Last active November 23, 2019 23:16
Show Gist options
  • Select an option

  • Save Giagnus64/82db67c033d47c16487eb54761b547cf to your computer and use it in GitHub Desktop.

Select an option

Save Giagnus64/82db67c033d47c16487eb54761b547cf to your computer and use it in GitHub Desktop.
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