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
| /* CHALLENGE 1 */ | |
| function sayHowdy() { | |
| console.log('Howdy'); | |
| } | |
| function testMe() { | |
| setTimeout(sayHowdy, 0); | |
| console.log('Partnah'); | |
| } |
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
| // Type JavaScript here and click "Run Code" or press Ctrl + s | |
| console.log('Hello, world!'); | |
| // CHALLENGE 1 | |
| function createFunction() { | |
| return function returned() { | |
| console.log('Hello'); | |
| } | |
| } |
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
| -- returns week to date records | |
| select * from tbl_users where | |
| extract(week from created_at) = extract(week from current_date) | |
| and extract(year from created_at) = extract(year from current_date) | |
| -- returns quarter to date records | |
| select * from tbl_users where | |
| extract(quarter from created_at) = extract(quarter from current_date) | |
| and extract(year from created_at) = extract(year from current_date) |
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
| select * from tbl_users | |
| where extract(month from created_at) = extract(month from current_date) | |
| and extract(year from created_at) = extract(year from current_date); |
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
| id | name | age | gender | created_at | |
|---|---|---|---|---|---|
| 1 | Homer S | 23 | Male | 2019-03-20 | |
| 2 | Brian M | 23 | Male | 2020-02-05 | |
| 3 | Mr P | 34 | Male | 2020-01-01 | |
| 4 | Sarah D | 59 | Female | 2019-06-13 | |
| 5 | Taylor S | 35 | Female | 2020-02-19 | |
| 6 | Terry Perry | 29 | Female | 2020-02-26 |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| .ingredients { | |
| color: red | |
| } |