package的入口>>
js:
index.js
py:
__init__.py
-------------------------------------------
import 的差異>>
js:
impot {...} from '...'
import XX as XX from '...'
py:
import package as nickName
import dir.package
from package import component
-------------------------------------------
檔案當前路徑>>
py:
os.getcwd()
php:
$_SERVER['PHP_SELF'], __FILE__
-------------------------------------------
專案當前路徑>>
-------------------------------------------
數值類型>>
js:
typeof(...)
py:
type(...)
php:
gettype()
-------------------------------------------
undefined, null>>
js:
... == null
typeof(...) == 'undefined'
py:
... is None
php:
isset(...), empty(...), is_null(...)
-------------------------------------------
沒有留言:
張貼留言