Day 4: Data Types
-
davidmeza 9 years ago How is this day 4? Didn't we do this in day 1? At least use Symbols if we are learning ES6 features.
-
PRASHANTB1984 9 years ago Well, since many people are learning programming for the very first time, slight variations or repetitions of features previously covered, might occur - typically with some new concept mixed in
-
-
jonatan_k 9 years ago The primitive type names provided in the description can be confusing - in fact the primitive types are written in lowercase (opposite to object equivalents which start with the capital letter).
You can try the following to see the real type names:
typeof "16"
typeof 16
typeof true
-
Shoban05 9 years ago Doubt Regarding string..!!
var my_str = "Hello World!"; Test case Passed
var my_str = new String("Hello World!"); Test Case not passing
-
verapi03 9 years ago It's because when using "new String" you are not creating a string but an object of type string. They are different. The best advice is try to NOT using the keyword "new" to create a primitive data type (as a string).
-
-
gswheeler 9 years ago Well they did say "assign" them a particular datatype.
var my_num = "4.2.3".split('.').length;
var my_bool = ((4 + 17) < (25 - 6));
var my_str = (4 + 8 * 3).toString();-
PRASHANTB1984 9 years ago Well, yes, that is valid :) And it means that you understood the concepts that we are looking for in any case.
-
-
[deleted] 9 years ago I started a GIT branch for those who need a little help let me know if you need explanations added as well https://github.com/giannioudis/7-Days-of-JavaScript
-
PRASHANTB1984 9 years ago Thank you for creating this material. It is quite useful!
-
Sort 6 Discussions, By:
Please Log In in order to post a comment