DEV Community

Adem Deliaslan
Adem Deliaslan

Posted on

Functions in Javascript - 00011

note: please ignore xPos and yPos values all my posts.

var yourNameFunc = function(){
var textX = random(0, 300);
var textY = random(0, 300);
var yourName = "Adem Deliaslan";
fill(255, 0, 0);
textSize(30);
text("Hiiii, " + yourName, textX, textY);
};

yourNameFunc();

output: "Hiiii, Adem Deliaslan"

Top comments (0)