Git Product home page Git Product logo

code_quizzer's People

Contributors

andrewcockerham avatar djres88 avatar mrpowers avatar praveenitmec avatar rey810 avatar tronerta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

code_quizzer's Issues

Chapter 2.2 Quizzes - Line 45

https://github.com/MrPowers/code_quizzer/blob/master/books/learn_javascript_logically/200_variables/250_variable_reassignment_questions.yml#L45

The blah variable is initially assigned to the "meh" string. The motivation variable is initially assigned to the "super!!!" string.

**The third line of code reassigns the variable blah to the variable motivation, which in turn is assigned to its own value ("super!!!"). Note that blah forgets its former value, "meh", the moment we reassign. By reassigning blah to motivation, we are saying that blah should now have the same value as motivation. And what is that value? "super!!!"

To drive this point home, what would happen if we reassigned motivation = "more than super!"and printed console.log(blah)?**

Chapter 2.2

Should we mention that values can have multiple variables assigned to them (but that variables can only be assigned to one value)? For example, if var x = 4 and var y = 4, then x + y = 8. On the other hand, if you assign var test = 10 followed by var test = 20, then test + test = 40.

Chapter 3.2

The chapter seems to go in reverse-order, with the most general concept coming last. I would recast this chapter as:

The JavaScript programming language includes seven different types of values. We have already introduced three of them: strings, numbers, and booleans.

Types are important because they help determine the kinds of operations you can perform as well as how those operations work. For example, see what happens in your console when you type the command "cat" + 5. Now try "cat * 5". See the difference? As you'll learn, JavaScript does some strange things when you try to combine different types (referred to as "type conversion"), and it's a common complaint with the language — more on that later.

To check the type of a value in JavaScript, we use the operator typeof(). (Operator is just a fancy programming word that means [what does operator mean?].) The typeof() operator can be used to demonstrate that true and false are boolean values:

typeof(true); // "boolean"
typeof(false); // "boolean"

We can also use typeof() to demonstrate that "dmx" is of the type string, and that integers like 8 and floats 6.72 are of the type number:

typeof("dmx"); // "string"
typeof(8); // "number"
typeof(9.99); // "number"

In the expressions above, typeof() is the operator while "dmx", 8, and 9.99 are referred to as "operands."

Chapter 3.4

https://github.com/MrPowers/code_quizzer/blame/master/books/learn_javascript_logically/300_types_if_statements/400_if_else_statements.md#L14

If the boolean condition evaluates to true, then the code block associated with the if statement will be executed. If the boolean condition evaluates to false, then the code block associated with the else statement will be executed instead.

In the following example, the boolean condition is true, so the code block associated with the if keyword is executed.

if ("a" === "a") {
console.log("one direction <3");
} else {
console.log("lfo");
}

The string "one direction <3" will be printed to the console. The code associated with the else keyword (console.log("lfo")) is not executed.

Chapter 3.1 - Line 3

https://github.com/MrPowers/code_quizzer/blame/master/books/learn_javascript_logically/300_types_if_statements/100_importance_of_precise_language.md#L3

**Computers are literal and precise. To a computer, for example, "two times the sum of four and three" is not the same as "two times four plus three" :

console.log(2 * (4 + 3)) // 14
console.log(2 * 4 + 3) // 11). 

Because computers are extremely strict in the way they interpret commands, it's important that we use precise language when talking about programming.**

Why gsub is not used?

For this question
Replace the "l" in the following string with "m":

word = "lace"

we could do word.gsub("l", "m")

instead

word[0] = "m"
puts word

Alternate answers for Ruby Array Conditionals Loops

Hello here the question:

First

lyric = ["laughter", "it's", "free"]
Get the first element of the lyric Array.

The Answer is lyric[0] and should include lyric.first

Second

lyric = ["laughter", "it's", "free"]
Get the last element of the lyric Array.

The Answer is lyric[-1] or lyric[2] and should include lyric.last

Operators/Operands

I think this needs to be weaved in a little better. As the reader, at the time operators/operands are introduced, I don't feel I have enough info to understand them completely. For example:

https://github.com/MrPowers/code_quizzer/blame/master/books/learn_javascript_logically/300_types_if_statements/100_importance_of_precise_language.md#L24

"In the following statement, 4 and 5 are referred to as operands and + is the operator."

^I understand operators and operands in this instance, but I'm not totally clear on the meanings of operand or operator because I'm not sure — based on this example — how far the concepts apply. For example, are there operands/operators in var x = function(array) { console.log(5 + 7)}? If so, what are they?

Let's chat about the most logical place for operators/operands.

Chapter1.3 (Whole Document)

First problem of "Loops with if" chapter doesn't work

It should be like this:

function joinIfString(array){
var result = "";
for(var i =0; i < array.length; i++){
if(typeof(array[i])== "string"){
result += array[i];
}
}
return(result);
}
var planet = ["earth", "fire", 34, undefined, "wind", [], "water"];
var r = joinIfString(planet); // you have (arr) here which is not defined
console.log(r);

FANBOYS ISSUE

It think it's more effective to introduce this point once than to keep making the small corrections.

FANBOYS refers to the coordinating conjunctions "for," "and," "nor," "but,", "or," "yet," and — most pertinent to the book — "so."

Every time you have a complete sentence that follows a FANBOYS word, it must be preceded by a comma. Here are examples:

David is tired today, so he won't be 100%.
The dog looks like he got into the trash again, so we won't need to feed him tonight.
Either you give me my cereal right now, or you'll be sorry come tomorrow.

Learning console.log

https://github.com/MrPowers/code_quizzer/blame/master/books/learn_javascript_logically/100_strings_numbers_booleans/100_introduction_to_strings.md#L20

I think you need to introduce console.log before you start using it in the examples. Maybe add an intro chapter before we get into strings, numbers and Booleans? The intro chapter would say (1) JavaScript is the language of the web. (2) Here's how you can use JavaScript in your browser (open the console). We can "print" the results of any operation using the console.log() function. (3) Now it's time to learn how JavaScript works, starting with the types of data found in JavaScript. First up: Strings, Numbers, and Booleans.

Chapter 3.1 - Line 24

https://github.com/MrPowers/code_quizzer/blame/master/books/learn_javascript_logically/300_types_if_statements/100_importance_of_precise_language.md#L24

In the following statement, 4 and 5 are referred to as operands and + is the operator.
(^I understand in this instance, but I'm not totally clear on what operand or operator mean because I'm not sure how far they apply. For example, are there operands/operators in var x = function(array) { console.log(5 + 7)}? If so, what are they?

Add specs

Can someone please help me add specs to this site!?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.