Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Most things are the same. Most notable differences:

  • No typings in JavaScript
  • Defining functions is different:
// C#:
float multiply(float a, float b) { return a * b; }
// JavaScript:
function multiply(a, b) { return a * b; }
// Or (shorter syntax):
const multiply = (a, b) => a * b;
  • Creating arrays is different:
// C#:
new int[] { 1, 2, 3, 4 }
// JavaScript
[ 1, 2, 3, 4 ]

You can just create objects "out of thin air", no need to pre-define classes, structs and other stuff:

// C#
struct Point {
    float x;
    float y;
}
// later
var point = new Point { x = 10, y = 20 };
// JavaScript
let point = { x: 10, y: 20 };

I hope this should get you started. Let me know if you have any other questions!

(+1)

I tried. Good! Thank you!  It was little bit difficult, i am from russia, i am 13 and I know english not perfectly.

:|

Привет, я тоже

Хах, я подозревал