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
// TODO: write your code here | |
const moveForward = (player) => { | |
const wagon = document.querySelector(`#player${player}-race .active`); | |
if (wagon.nextElementSibling) { | |
wagon.nextElementSibling.classList.add('active'); | |
wagon.classList.remove('active'); | |
} else { | |
alert(`Player ${player} wins! Play again?`); | |
window.location.reload(); | |
} |
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
/* eslint-disable no-multiple-empty-lines */ | |
/* eslint-disable prefer-const */ | |
/* eslint-disable import/extensions */ | |
import runChallenges from "../spec/inbox_examiner.js"; | |
const hasNewMessage = () => { | |
// TODO: return true with a probability of 20%. | |
return Math.random() < 0.2; | |
}; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Form Validation</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="shortcut icon" href="data:image/x-icon;" type="image/x-icon"> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" | |
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> |
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
<html> | |
<head> | |
<title>Dribbble card</title> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="css/style.css"> | |
</head> | |
<body> | |
<div class="card-container"> |
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
def acronym(sentence) | |
return sentence.split.map { |word| word[0] }.join.upcase | |
end |
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
def acronym(sentence) | |
# we split the sentence into words | |
# grab first letter of each word | |
# join the first letters | |
final = [] | |
array_of_words = sentence.split(' ') | |
array_of_words.each do |word| | |
final << word[0].upcase | |
# p final |
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
def coach_answer(your_message) | |
if your_message.upcase == "I AM GOING TO WORK RIGHT NOW!" | |
return "" | |
elsif your_message.end_with?("?") | |
return "Silly question, get dressed" | |
else | |
return "I don't care" | |
end | |
end |
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
{ | |
mode: 'development', | |
context: '/Users/kissu/code/vue3-webpack', | |
output: { | |
hashFunction: 'xxhash64', | |
path: '/Users/kissu/code/vue3-webpack/dist', | |
filename: 'js/[name].js', | |
publicPath: '/', | |
chunkFilename: 'js/[name].js' | |
}, |
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
/** | |
* A function to take a string written in dot notation style, and use it to | |
* find a nested object property inside of an object. | |
* | |
* Useful in a plugin or module that accepts a JSON array of objects, but | |
* you want to let the user specify where to find various bits of data | |
* inside of each custom object instead of forcing a standardized | |
* property list. | |
* | |
* @param String nested A dot notation style parameter reference (ie "urls.small") |
NewerOlder