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
const getSleepHours = day => 8; | |
const getActualSleepHours = () => getSleepHours('Monday') + getSleepHours('Tuesday') + getSleepHours('Wednesday') + getSleepHours('Thursday') + getSleepHours('Friday') + getSleepHours('Saturday') + getSleepHours('Sunday'); | |
const getIdealSleepHours = () => { | |
let idealHours = 8; | |
return idealHours * 7; | |
} | |
const calculateSleepDebt = () => { |
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 input = 'Mi chiedi qual è stato il mio progresso? Ho cominciato a essere amico di me stesso.'; | |
const vowels = ['a', 'e', 'i', 'o', 'u']; | |
let resultArray = []; | |
for(i = 0; i < input.length; i++){ | |
//console.log(i); | |
for(j = 0; j < vowels.length; j++){ | |
if(input[i] === vowels[j]) { | |
if(vowels[j] === 'e' || vowels[j] === 'u') { | |
resultArray.push(vowels[j] + vowels[j]); |
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 story = 'Last weekend, I took literally the most beautiful bike ride of my life. The route is called "The 9W to Nyack" and it actually stretches all the way from Riverside Park in Manhattan to South Nyack, New Jersey. It\'s really an adventure from beginning to end! It is a 48 mile loop and it basically took me an entire day. I stopped at Riverbank State Park to take some extremely artsy photos. It was a short stop, though, because I had a really long way left to go. After a quick photo op at the very popular Little Red Lighthouse, I began my trek across the George Washington Bridge into New Jersey. The GW is actually very long - 4,760 feet! I was already very tired by the time I got to the other side. An hour later, I reached Greenbrook Nature Sanctuary, an extremely beautiful park along the coast of the Hudson. Something that was very surprising to me was that near the end of the route you actually cross back into New York! At this point, you are very close to the end.'; | |
let overusedWords = ['really |
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
// Creating Menu | |
const menu = { | |
_courses: { | |
appetizers: [], | |
mains: [], | |
desserts: [] | |
}, | |
get courses(){ | |
return { | |
appetizers: this.appetizers, |
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
const team = { | |
_players: [ | |
{ | |
firstName: 'Carol', | |
lastName: 'Snitz', | |
age: 31 | |
}, | |
{ | |
firstName: 'Julie', | |
lastName: 'Lingus', |
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
class Media { | |
constructor(title) { | |
this._title = title; | |
this._isCheckedOut = false; | |
this._ratings = []; | |
} | |
get title(){ | |
return this._title; | |
} | |
get isCheckedOut(){ |
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
class School { | |
constructor(name, level, numberOfStudents){ | |
this._name = name; | |
this._level = level; | |
this._numberOfStudents = numberOfStudents; | |
} | |
get name(){ | |
return this._name; | |
} | |
get level(){ |
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
const FancyString = {}; | |
FancyString.countCharacter = function(inputString, inputCharacter) { | |
let count = 0; | |
let string = inputString.toLowerCase(); | |
let character = inputCharacter.toLowerCase(); | |
for (let i = 0; i < string.length; i++) { | |
if (string[i] === character) { | |
count++; | |
} | |
} |
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
<?php /** | |
* Single Product Thumbnails | |
* | |
* @param array $args | |
* @param int $attachment_id | |
* @param string $image_size | |
* @param bool $main_image | |
* @return array | |
*/ | |
function bones_gallery_image_html_attachment_image_params ( $args, $attachment_id, $image_size, $main_image ) |
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
<?php | |
$annualExpenses = [ | |
"vacations" => 1000, | |
"carRepairs" => 1000, | |
]; | |
$monthlyExpenses = [ | |
"rent" => 1500, | |
"utilities" => 200, |