https://github.com/drivly/codex.do
GPT-3 Codex Completions API
https://github.com/drivly/codex.do
Last synced: 4 months ago
JSON representation
GPT-3 Codex Completions API
- Host: GitHub
- URL: https://github.com/drivly/codex.do
- Owner: drivly
- License: mit
- Created: 2022-09-27T13:29:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-31T22:13:12.000Z (over 2 years ago)
- Last Synced: 2025-02-16T15:16:54.099Z (4 months ago)
- Language: JavaScript
- Homepage: https://codex.do
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# codex.do
GPT-3 Codex Completions API```javascript
// ES6 arrow function called fizzBuzz
const fizzBuzz = (num) => {
// if the number is divisible by 3 and 5, return FizzBuzz
if (num % 3 === 0 && num % 5 === 0) {
return 'FizzBuzz';
}
// if the number is divisible by 3, return Fizz
if (num % 3 === 0) {
return 'Fizz';
}
// if the number is divisible by 5, return Buzz
if (num % 5 === 0) {
return 'Buzz';
}
// if the number is not divisible by 3 or 5, return the number
return num;
};// for loop that iterates from 1 to 100
for (let i = 1; i <= 100; i++) {
// console.log the result of fizzBuzz(i)
console.log(fizzBuzz(i));
}
```