GithubHelp home page GithubHelp logo

hyf-javascript-1's Introduction

Hi there ๐Ÿ‘‹

hyf-javascript-1's People

Contributors

dodo-logan avatar

hyf-javascript-1's Issues

Hi, providing feedback per homework for JS module 2 week 1

It seems Jim has already been here.

But for some other things:-

ARRAY.JS - just looking at the last lines, you may want to define the last variable "a" as something else, or you may not remember the code some time down the line.

Also a good idea to watch the spacing, +a should be + a.

FUNCTION.JS -

// step11 console.log("if I added a new vehicle to the list ,the code will change."); I think the idea is that if you added something in here, it's supposed to integrate the additional object within the array.

I think though that on a whole you probably did better than me here.

STRING.JS -looks fine.

J.

Feedback homework week 2

Hi Kaze, thanks for posting your homework. Here is my feedback.

  • VSCode can check your code JavaScript for simple mistakes or bad practices using a facility called eslint. This is explained in VSCode Tips - Installation Instructions. In order for this to work you need to create a file called .eslintrc.json as explained in VSCode Tips - Using VSCode for your homework. I didn't find this file in you repo and I advise you to create as per the instructions.

exercise 1

  • Pay attention to details: there should be a space following the comma after 'bonjour'.

exercise 2

  • Although you fixed the problem, can you also make it work while retaining the apostrophe (= single quote) in I'm? Again, pay attention to detail: the I in I'm should be a capital.

exercise 3

  • Your code formatting could be improved. The way it is now indicates to me that you are missing some settings in VSCode. Please check VSCode Tips - Customise VSCode Settings and apply these settings:
"editor.formatOnType": true,
"editor.formatOnPaste": true
  • You can manually reformat your JavaScript files by using the Format Document keyboard shortcut as explained in VSCode Tips - Some useful short-cut commands. Try it on your files and see what happens!

  • For punctuation symbols such as ,, ; and : the rule is there should no space before the symbol and one space after the symbol:

... x will be: undefined!');
              ^space here

exercise 4

  • Your name is Logan, (starting with a capital) right?

exercise 8

  • Be aware that the typeof an array is actually 'object', i.e. an array is a special type of object.

Your code:

if (typeof l === typeof country, typeof country === age, typeof age === typeof programmer) {
  ...
}

is actually equivalent to:

if (typeof age === typeof programmer) {
  ...
}

The comma separating the conditions in your if statement is interpreted here as a 'comma operator'. See this article: MDN - Comma operator. If you want to test these various conditions, it is best to create one if statement per condition, like this:

if (typeof l === typeof country) {
  console.log('SAME TYPE')
}
else {
  console.log('NOT SAME TYPE');
}

if (typeof country === age) {
  console.log('SAME TYPE')
}
else {
  console.log('NOT SAME TYPE');
}

if (typeof age === typeof programmer) {
  console.log('SAME TYPE')
}
else {
  console.log('NOT SAME TYPE');
}

exercise 9:

  • There is a spelling error in your text string: remainer -> remainder. Did you install the Spell Checker extension in VSCode? See the VSCode Tips.

exercise 10

  • This exercise is missing

As you can see, most of my comments are about formatting and spelling. Check the VSCode Tips to remedy the issues. Functionality-wise you did very well. Congrats!

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.