Basic JavaScript 090
61-Comparison with the Less Than Or Equal To Operator
function testLessOrEqual(val) {
if (val <= 12) { // Change this line
return "Smaller Than or Equal to 12";
}
if (val <= 24) { // Change this line
return "Smaller Than or Equal to 24";
}
return "25 or More";
}
// Change this value to test
testLessOrEqual(10);62-Comparisons with the Logical And Operator
function testLogicalAnd(val) {
// Only change code below this line
if ( val<=50 && val>= 25 ) {
return "Yes";
}
// Only change code above this line
return "No";
}
// Change this value to test
testLogicalAnd(10);63-Comparisons with the Logical Or Operator
64-Introducing Else Statements
65-Introducing Else If Statements
66-Logical Order in If Else Statements
67-Chaining If Else Statements
68-Golf Code
69-Selecting from many options with Switch Statements
70-Adding a default option in Switch statements
71-Multiple Identical Options in Switch Statements
72-Replacing If Else Chains with Switch
73-Returning Boolean Values from Functions
74-Return Early Pattern for Functions
75-Counting Cards
76-Build JavaScript Objects
77-Accessing Objects Properties with the Dot Operator
78-Accessing Objects Properties with Bracket Notation
79-Accessing Objects Properties with Variables
80-Updating Object Properties
81-Add New Properties to a JavaScript Object
82-Delete Properties from a JavaScript Object
83-Using Objects for Lookups
84-Testing Objects for Properties
不能用 dot 要用 bra陣列陣列一樣嘛ket notation,有人說是因為資料存在變數裡面(就像是)
86-Accessing Nested Objects
87-Accessing Nested Arrays
物件的屬性存取可以用 dot 或是 bracket notation
陣列的內容存取只能用 []
88-Iterate with JavaScript For Loops
for ([initialization]; [condition]; [final-expression])
89-Iterate Odd Numbers With a For Loop
90-Count Backwards With a For Loop
Last updated
Was this helpful?