JavaScript 入門小技巧(Variables篇)
JavaScript 入門小技巧(Variables篇)
小知識教學類型: 網頁設計、網站製作
編寫網站程式,前文說過JavaScript絕對是三劍俠之一,主要用於client side,但又有很多端口和方法可以與server side聯繫!
今次和大家說說入門的小技巧Variables篇:
JavaScript 有三個常用的方法去定義 Variables: var, let 和 const, 例如:
var x = 5;
Variables 之間可以從不同的運算+ - * /而互相聯繫著,例如:
let a, x, y, z;
x = 5;
y = 7;
z = 88;
a = x + y + z;
JavaScript Data Types 有著比較特別的處理方法,基本上例如使用var去創建Variables,己可以是數值Numbers
(e.g. 123) 和 字串Strings (e.g. "ABC"),無需使用其它任何獨突的方法去創建。例如:
var xyz = 1.2222;
var people = "Peter";
JavaScrip 亦可以容許你創建沒有任何 value 的 undefined Variables,容你於後期時才使用,例如:
var Home;
Read
also our another Blogs-
https://www.behance.net/Compbrotherhk
https://www.pinterest.com/comprbrotherpin/
https://www.youtube.com/watch?v=zNuWEoWNxbA
https://compbrother.wordpress.com/
https://sketchfab.com/Compbrotherhk
https://twitter.com/compbrotherltd
https://slides.com/compbrotherhk
https://compbrother.medium.com/
https://www.slideserve.com/Compbrotherhk
https://www.flickr.com/photos/compbrother/
https://compbrother.pixnet.net/blog
https://compbrotherhk.blogspot.com/
https://compbrotherblog.wordpress.com/
https://issuu.com/compbrotherhk
Comments
Post a Comment