Last login: Wed Jan 19 09:23:04 on ttys002 The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. MAC:Wed Jan 19:09:43:~> node Welcome to Node.js v16.13.2. Type ".help" for more information. > let title = "Hello, there"; undefined > title 'Hello, there' > title[0] 'H' > title[0] = 'h'; 'h' > title 'Hello, there' > title.charAt(0) 'H' > title.contains("H") Uncaught TypeError: title.contains is not a function > title.length 12 > "some" + "thing" 'something' > "some".concat("thing") 'something' > > > "x "x ^^ Uncaught SyntaxError: Invalid or unexpected token > "x"*50 NaN > "something".endsWith("g") true > "something".beginsWith("g") Uncaught TypeError: "something".beginsWith is not a function > "something".startsWith("g") false > // state, identity, behavior undefined > // state: what an object KNOWS string: characgter sequence undefined > // identity: an object's physical presence in memory undefined > // behavior: what an object can DO undefined > // methods can depend on object state undefined > let q = "Cuckamonga"; undefined > q.indexOf("o") 6 > q.charAt(q.indexOf("o")) 'o' > q.indexOf("a") 4 > q.indexOf("a", 5) 9 > q.lastIndexOf("a") 9 > q.contains("z") Uncaught TypeError: q.contains is not a function > q.contains("z") Uncaught TypeError: q.contains is not a function > q 'Cuckamonga' > q.includes("z") false > q.substring(q.indexOf("a")+ 1, q.lastIndexOf("a")) 'mong' > MAC:Wed Jan 19:10:02:~>