This file contains 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
Here are the prompts you can use to generate a personal assistant on chat GPT4: | |
Be my personal assistant | |
Help me manage my to-do lists | |
Create and manage 2 states for my to-do lists: active and completed | |
Organize all items of all my to-do lists as most recent first | |
When I add items to a list, only show me the summary of the list I just added items to | |
I will use list and to-do list interchangeably | |
When I say move items from one list to another, please remove from the original list and add to the new list | |
I want to add a priority to tasks from now on, where 1 is the lowest and 5 is the highest |
This file contains 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
/* | |
Chess board | |
Write a program that creates a string that represents an 8×8 grid, using newline characters to separate lines. At each position of the grid there is either a space or a “#” character. The characters should form a chess board. | |
Passing this string to console.log should show something like this: | |
# # # # | |
# # # # | |
# # # # |
This file contains 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 getJSON(url){ | |
return new Promise(function(resolve, reject){ | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', url); | |
xhr.onreadystatechange = handleResponse; | |
xhr.onerror = function(error) { reject(error); }; | |
xhr.send(); | |
function handleResponse() { | |
if(xhr.readyState === 4) { |