Homework-4 #11

Merged
merged 1 commit into from Dec 21, 2018

Conversation

Projects
None yet
2 participants
@cubofantastico
Contributor

cubofantastico commented Dec 17, 2018

No description provided.

@vodnik

vodnik approved these changes Dec 21, 2018

Nice work, Daniel.

$('#save').on("click", function () {
if (favStartups.indexOf(currentStartup) === -1) {
favStartups.push(currentStartup);
console.log(`Saved: '${currentStartup}'`);

This comment has been minimized.

@vodnik

vodnik Dec 21, 2018

Owner

Nice work adding error checking, Daniel! Also, hooray for template literals!

if ($question === '') {
alert('You must enter a question')
} else {
const $label = $('<label></label>').text($question);

This comment has been minimized.

@vodnik

vodnik Dec 21, 2018

Owner

Your code here is correct jQuery, but you can create a new element more concisely by eliminating the closing tag. $('<label>') is equivalent to $('<label></label>').

@vodnik vodnik merged commit 56ac68b into vodnik:master Dec 21, 2018

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