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
| function partial(fn, ...args){ | |
| // nothing yet... | |
| } | |
| function basic() { | |
| // nothing yet... | |
| } | |
| partial(basic, 2, 3, 4) |
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
| function logPartial(fn, ...args){ | |
| console.log(fn, args) | |
| } | |
| function basic() { | |
| return true | |
| } | |
| logPartial(basic,2,3,4) |
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
| function logPartial(fn, ...args){ | |
| console.log(fn, args) | |
| } | |
| logPartial(1,2,3,4) | |
| >> 1, [2, 3, 4] |
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
| function logPartial(fn, a, b, c){ | |
| console.log(fn, a, b, c) | |
| } | |
| logPartial(1,2,3,4) | |
| >> 1, 2, 3, 4 |
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
| function logPartial(fn, ...args){ | |
| console.log(fn, args) | |
| } | |
| logPartial(1,2,3) | |
| >> 1, [2, 3] |
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 ADD_PROJECTS = "projects/add_projects" | |
| const initialState = { | |
| projects: [] | |
| } | |
| function reducer(state = initialState, action = {}){ | |
| switch(action.type){ | |
| case ADD_PROJECTS: | |
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 ADD_PROJECTS = "projects/add_projects" | |
| const initialState = { | |
| projects: [] | |
| } | |
| export default function reducer(state = initialState, action = {}){ | |
| switch(action.type){ | |
| case ADD_PROJECTS: | |
| return { |
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
| var myCarousel = document.getElementById('myCarousel'); | |
| if(myCarousel) { | |
| console.log('Carousel Exists'); | |
| } else { | |
| console.log('Carousel Does Not Exist'); | |
| } | |
| // 'Carousel Does Not Exist' |
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
| var $myCarousel = $('#myCarousel'); | |
| if($myCarousel){ | |
| console.log('Carousel Exists'); | |
| } else { | |
| console.log('Carousel Does Not Exist Yet'); | |
| } | |
| // 'Carousel Exists' |
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
| var foo, | |
| a = 1, | |
| b = 2; | |
| foo = a === b ? 'Matches' : 'Does not match'; | |
| console.log(foo); // 'Does not match' |