| Topic | Python | both | JavaScript |
|---|---|---|---|
| comments | #""" """ |
///* */ |
|
| declaration | my_var = 5 |
var myVar = 5let myVar = 5 const myVar = 5 |
|
| operators | // |
+-***/% |
|
| assignment | =+=-=*=**=/=%= |
||
| deletion | del(my_var) |
delete(myVar) |
|
| increment decrement |
++-- |
||
| equivalence | is |
==``!= |
===``!== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| #define print(s) std::cout << s << std::endl; | |
| using String = std::string; // typedef std::string String; // I don't want to using namespace std - I only want to cherry-pick this one definition. | |
| class Car { | |
| public: | |
| String brand; | |
| String model; | |
| int year; |
NewerOlder