Thanks! If you know C#/C++/Java, you should be fine, as they are close enough.
Viewing post in Farm with Code / JavaScript jam comments
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!