dev1 – JS Basics, Control Flow

DIRECTORY

Problem Set:

Falsy-ness is often used to check whether a given piece of data is a certain data type ( String or Int).

!Number(value) //to test if that's a number

True values //   the console will return false meaning the values are numbers
1
2
3

false values // the console will return true meaning the values are not numbers
""
null
undefied
NaN
0

in order to change a for loop into a while loop you need to have two values two compare and a break statement, which will leave the while loop.

Leave a comment

Your email address will not be published. Required fields are marked *

css.php