3 years ago

Question regarding Javascript


I have an object render.singleBuild containing several functions.

I would like to be able to do a forEach loop on this object and execute all its functions, instead of calling them one by one like:

		
			render.singleBuild.header;
render.singleBuild.downloadArea;
		
	

I currently have, but after some extensive search I still couldn't find how to call them

		
			Object.keys(render.singleBuild).forEach(f => ???);
		
	

A simple (f => f()) doesn't work, nor (f => (f)()) nor (f => eval(f))

Any suggestions? Maybe the function definition should be different in the singleBuild object?

@CROS @YLivay because you're cool and sometimes help me out plz



5 comments

Loading...

Next up

Maybe Louis song? #beastars

Lyrics:

I feel this rotting number burning on my leg again, Fears of a past I can't erase set my whole world up in flames I'll use the pain to wake the wolf you keep inside of you, Please help me start anew

Anime gore ahead watch out! (And spoilers too)

This took me a whole day but I'm super darn happy with the dynamic outcome given my limited skill-set! I'll be continuing with the shading and animation tomorrow

#beastars

We made a game for GMTK's 2025 Game Jam with a friend! (my first game jam btw)

Check it out here! :)

itch.io/jam/gmtk-2025/rate/3779449

Welcome to 'Mytherland' - a brand new interactive community website which will open very soon: https://myther.land

Me: "Hey! Can you sing this?"

Singer:

Stickit' Truddy, web-project introduction

A website where you can Collect and Swap stickers with friends and fill up your collector's albums!

Join dev journey at gamejolt.com/c/stickit-kt5adm

#webdev #art

I made some more Melon Mother for some other shots of the video!

#beastars #fanart #musicVideo

Well would you look at this, I voiced this character hehe

@Raccoonicorn

I am super happy to see that my favourite song of my OST Album for Briar has the most plays of all!

It's not a lot but still it means a ton! :D Thank you

open.spotify.com/track/3MmOnOP5GwisxS7gRBR65M