Creating Star Patterns with JavaScript 使用Javascript程式創建星形圖案
Date: February 22, 2021
JavaScript
<script> </script>
<script>
tag is used to embed a JavaScript in a HTML document. 籤用於在HTML文檔中插入一個JavaScript程式
Printing a number 輸出數字
document.write(10)
Calculating a number 計算數字
document.write(10*10)
Printing a text string 輸出串字
document.write(“10*10”)
What is a variable? 甚麼是可變因素?
A variable is a container for storing data values.
In other words, it’s a number that changes its value.
可變因素是一個存儲數值的容器
也就是說,它是一個可以改變其數值的數字