Homework 2 #5

Merged
merged 7 commits into from Dec 12, 2018

Conversation

Projects
None yet
2 participants
@norbs
Contributor

norbs commented Nov 30, 2018

No description provided.

@vodnik

vodnik approved these changes Dec 12, 2018

for(let i=1;i<=100;i++) {
let fizz = i % 3 === 0;
let buzz = i % 5 === 0;
let output = i;

This comment has been minimized.

@vodnik

vodnik Dec 12, 2018

Owner

This is an elegant solution -- creating an output variable and then mutating it (or not) depending on the tests. Nice!

// array value. (Hint: How can you shorten your code using a second forEach
// function parameter?)

for(let i=1;i<=100;i++) {

This comment has been minimized.

@vodnik

vodnik Dec 12, 2018

Owner

I recommend spaces around operators for readability.

breed: 'FOMO Shepherd',
noise: 'woof!',
makeNoise: function() {
console.log(this.noise);

This comment has been minimized.

@vodnik

vodnik Dec 12, 2018

Owner

You nailed this!

BONUS 3: Clear the contents of the text box after you've displayed your results, so a user can easily enter another temperature to convert. (Hint: Read about the 'value' property in JavaScript. What string value could you assign as the value of an input box that would give it no content to display?)
*/

let getInput = function() {

This comment has been minimized.

@vodnik

vodnik Dec 12, 2018

Owner

I like your clean functional programming style -- everything function has a clear focus.

// (HINT: The image should be a sibling to the h3 and p elements you already
// added.)

let aboutImg = document.createElement("img");

This comment has been minimized.

@vodnik

vodnik Dec 12, 2018

Owner

Nicely done!

@vodnik vodnik merged commit 37f9613 into vodnik:master Dec 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment