Skip to content

dom lab#2

Open
Denae716 wants to merge 4 commits intoReturn-Ready-2021-JavaScript-Evening:mainfrom
Denae716:main
Open

dom lab#2
Denae716 wants to merge 4 commits intoReturn-Ready-2021-JavaScript-Evening:mainfrom
Denae716:main

Conversation

@Denae716
Copy link
Copy Markdown

just realized I never created a pull req for the original submission

@kburd kburd self-requested a review December 28, 2020 19:35
Copy link
Copy Markdown

@kburd kburd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part one (-7)
Missing part 2 (-33)
Missing Part 3 (-33)

Finish up part 2 and 3 and resubmit (27%)

domlab.js Outdated
// f to c cnvertor function

function calc(userInput){
userInput = document.getElementsByClassName('userInput').value
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrectly getting user input, console.log() the userInput and tweak your code until you get the number the user entered to display in the console (-2)

domlab.js Outdated
userInput = document.getElementsByClassName('userInput').value
let c = document.getElementsByClassName('c').value
c += userInput - 32 * (5/9)
console.log(c)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should update the celsius value on the screen with the calculated value, not console.log() the value (-5)

domlab.js Outdated

let button = document.getElementsByClassName('calculateButton')

button[0].addEventListener('click', calc);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Event trigger works perfectly!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants