Message from JavaScript talks

January 2017

— Sorry, i don't understand. English isn't my native lang

— 

You meant for what reason I'd asked this? I want to learn JS, then NodeJS. And it would be strange to not to use js by people from this group

— Of course not, but you stay because you want, not because you use js.

— Hi

— I am so newbie, i've get some question

— What is meaning object is not a function?

— Show us some code m8

— Var draw = function(){

//set variable for canvas to draw object
var canvas = "";


var gunung = function (tingkat){
canvas += "/"; //awal gunung
for (var x = 0 ;x < tingkat; x++)
canvas += "-"; //panjang kawah

canvas += "\\"; //akhir dari gunung

}

var data_function = [
function tembok(size) {
canvas += "[";
for (var x = 0;x < size;x++){
canvas += "x";
}
canvas += "]";
},
function jalan(panjang){
for (var x = 0; x < panjang ; x++)
canvas += "_";
}

]

for (var x = 0; x < 3; x++){
var rand_num = Number(Math.floor(Math.random() * 3));
data_function[rand_num](Math.floor(Math.random() * 7));
console.log(rand_num);
}

return canvas;
}

console.log(draw());

Message permanent page

— Error line?

— When i input math random for data_function object

— Meh where did you find this code?

— That's not how objects work