Skip to content

cs-ufm/javascripting

Repository files navigation

Syntax / Python vs Javascript XLR

Python JavaScript
def (...): function(...) {}
if ...: if (...) {}
while ...: while (...) {}
elif ...: } else if (...) {
else: } else {
pass {}
print(...) console.log(...)
True true
False false
None null
Or ||
And &&
Unset undefined
not !
is ===
del delete
\n ;\n
# comment // comment
str(...) String(...)
bool(...) Boolean(...)
int(...) Number(...)
import pdb; pdb.set_trace() debugger;
try: try {
except catch
except Exception as e catch(e)
.append(...) .push(...)
raise 'error' throw 'error';
import x var x = require(x)
import x as _ var _ = require(x)
"String" 'String'
"""String""" 'Str' + 'ing'
@decorator f = decorator(f)

Examples

Follow every .js file in the a-z0-9 order to keep moving.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published