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 = (a, b) => a + b; | |
| const multiply = (a, b) => a * b; |
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 sum = (a, b) => { | |
| return | |
| { | |
| result: a + b | |
| } | |
| } | |
| const result = sum(1, 3) | |
| console.log(result) |
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 a = 5 | |
| const b = 10 | |
| const c = a + b | |
| [1, 2, 3].forEach((e) => console.log(e)) |
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
| let myFunction = () => { | |
| return; | |
| } | |
| const result = myFunction() |
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
| let myFunction = () => { | |
| return | |
| } | |
| const result = myFunction() |
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
| let a = 10; | |
| let b = true; | |
| if(b) { | |
| console.log('B is truthy'); | |
| } | |
| console.log('A is ', a) |
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
| let a = 10; | |
| let b = true; | |
| if(b) { | |
| console.log('B is truthy'); | |
| } | |
| console.log('A is ', a); |
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
| let a = 10; | |
| let b = true; | |
| if(b) { | |
| console.log('B is truthy') | |
| } | |
| console.log('A is ', a) |
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
| let a = 10 | |
| let b = true | |
| if(b) { | |
| console.log('B is truthy') | |
| } | |
| console.log('A is ', a) |
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 myFunction = () => { | |
| return 'Returned from myFunction!'; | |
| }; | |
| const templateResult = `Function expression in template: ${() => myFunction()}`; | |
| console.log(templateResult); //Outputs -> Function expression in template: () => myFunction() | |
| const myTag = (literals, func) => { | |
| return literals[0] + func(); | |
| }; |
NewerOlder