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 currentQuestion = 0 | |
let score = 0 | |
const numOfQuestions = questions.length | |
const numOfChoices = 3 | |
const questionCountElement = document.getElementById('question-count') | |
function displayCount () { | |
const countMessage = `${currentQuestion + 1}/${numOfQuestions}` | |
questionCountElement.innerText = countMessage | |
} |
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 currentQuestion = 0 | |
let score = 0 | |
const numOfQuestions = questions.length | |
const numOfChoices = 3 | |
const questionCountElement = document.getElementById('question-count') | |
function displayCount () { | |
const countMessage = `${currentQuestion + 1}/${numOfQuestions}` | |
questionCountElement.innerText = countMessage | |
} |
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 currentQuestion = 0 | |
let score = 0 | |
const numOfQuestions = questions.length | |
const numOfChoices = 3 | |
const questionCountElement = document.getElementById('question-count') | |
function displayCount () { | |
const countMessage = `${currentQuestion + 1}/${numOfQuestions}` | |
questionCountElement.innerText = countMessage | |
} |
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 currentQuestion = 0 | |
let score = 0 | |
const numOfQuestions = questions.length | |
const numOfChoices = 3 | |
const questionCountElement = document.getElementById('question-count') | |
const questionContainerElement = document.getElementById('question-container') | |
const choicesContainerElement = document.getElementById('choices-container') | |
function displayCount () { | |
const countMessage = `${currentQuestion + 1}/${numOfQuestions}` |
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 currentQuestion = 0 | |
let score = 0 | |
const numOfQuestions = questions.length | |
const numOfChoices = 3 | |
const questionCountElement = document.getElementById('question-count') | |
const questionContainerElement = document.getElementById('question-container') | |
const choicesContainerElement = document.getElementById('choices-container') | |
function displayQuestion () { | |
const question = questions[currentQuestion] |
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
// https://nodejs.org:80/en | |
// Protocol (http://) - Language | |
// Domain (nodejs.org) - Computer | |
// Port (:80) - Program | |
// Path (/en) - Files/Folders? Custom Section/Command | |
// import http from 'http' | |
const http = require('http') | |
const server = http.createServer((request, response) => { |
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 message = 'hello world' | |
var count = 1 | |
var accurate = true | |
var passcodes = { | |
'front': 1234, | |
back: 3050, | |
kitchen: count, | |
3: 123, | |
'Kit_!@#$%%^&*()chen': 'twice', |
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 passcodes = { | |
back: 3050, | |
kitchen: 'open sesame', | |
} | |
passcodes['back'] = 12345 | |
console.log(passcodes['back']) | |
var subjects = ['js', 'html', 'css', 'react', 'servers', 'aws'] | |
console.log(subjects) | |
// subjects[6] = 'TypeScript' |
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
// Question 1: Anonymous Function | |
// Write an anonymous function that takes two numbers as parameters and returns their sum. | |
var add = function (a, b) { | |
return a + b | |
} | |
var sum = add(3, 4) | |
console.log(sum) | |
console.log("\n-------------------------------------------------\n"); |
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
// 1. Create a variable `favoriteFruits` and assign it an array of strings representing your favorite fruits. | |
var favoriteFruits = ['apples', 'olives', 'grapes'] | |
console.log(favoriteFruits) | |
console.log("\n-------------------------------------------------\n"); | |
// 2. Create a variable `mixedArray` that contains a mix of data types, including numbers, strings, and booleans. | |
var mixed = [1, 'hello', true] |