Day 8 Data types, Variables, and Operators (Ⅳ)

Truth Table
Let A and B be two Boolean variables.

Then the truth table for logical operators is as follows:
https://ithelp.ithome.com.tw/upload/images/20210920/2014045786m9eXNDcq.png

Arithmetic Compound Assignment Operators
https://ithelp.ithome.com.tw/upload/images/20210920/201404574TJl0MgFPE.png

EX1:
https://ithelp.ithome.com.tw/upload/images/20210920/201404576lFsLGtq5o.jpg

EX2:
https://ithelp.ithome.com.tw/upload/images/20210920/201404571dga2GF0Hf.jpg

比较++x & x++的差异
https://ithelp.ithome.com.tw/upload/images/20210920/20140457EXdDGyzWcU.jpg
++x 是先加值到x,再传回y,所以x=1+1=2=y.
x++ 是先传值给y, x再加值,所以x=1=y,x+1=2.
这两个很容易搞混!必须注意!


<<:  [Day12] swift & kotlin 实作篇!(3) 专案架构介绍

>>:  [Day5][笔记] React Component (上)

【Day 1】前言、时程规划

嗨大家! 在大二升大三的这个暑假,系上很多同学申请了实习、规划了 project 实作,却因为疫情升...

学习JavaScript第一天--console 里练习JavaScript基本型别

typeof-->可以查出型别 let a = 1 ; undefined a 1 typeo...

Day31 - Windows 提权(2)-AlwaysInstallElevated、Unattended Installs、Bypassing UAC

AlwaysInstallElevated 设定 在 Windows 当中有一种设定可以让非管理权限...

Day7|【Git】提交档案至储存库 - git commit

复习一下上一篇提到 git 四个常使用的指令: git status : 查询目前目录的「状态」 g...

30-19 之 Domain Layer - Repository

接下来我们要来谈谈,应该不少人常听到的『 Repository 』这个东东,目前我先将他放在 3-T...