commit 528a9a5ca0c121d6f62d1d4567487103f6e5e345
parent b9d4e19e56e8d7cf8e89889c558cce2969921a97
Author: thing1 <thing1@seacrossedlovers.xyz>
Date: Wed, 11 Feb 2026 11:52:43 +0000
lecture notes on js
Diffstat:
1 file changed, 30 insertions(+), 0 deletions(-)
diff --git a/CS10120/11.02.26.md b/CS10120/11.02.26.md
@@ -0,0 +1,30 @@
+# 11/02/26
+
+- JavaScript has goto
+- Types
+ - Number type, for ints and floats
+ - String, for strings
+ - Boolean, for bools
+ - Undefined, un-assigned value
+ - Null, empty object
+- NaN is returned for numbers sometimes
+- `let` is used to create a variable
+
+- String Methods
+ - `charAt(Number) // indexes a string`
+ - `indexOf(String) // the first instance of the arg`
+ - `substring(Number, Number) // gets the sub string in the range, (inclusive, non-inclusive)`
+ - `toLowerCase() // lower case version of the object`
+ - `toUpperCase() // lower case version of the object`
+ - `length // the length of the string`
+
+- adding `use strict` to the top of the JS file, this enforces more rules
+
+- all the same operators as c, except from `===` and `!==`, these operators don't allow for type conversion
+
+- the `typeof()` opperator, gives you a string of the type of object,
+excluding `"object"`, which can mean an object or null
+
+- constants aren't real
+
+