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

I'm often working on random things. Sometimes I need a bit of help, feedback, opinions, or even testing out things

If you're interested I've made a community for that, and where you can also share your stuff & for chilling! https://discord.gg/sq9zgjtc

Melon Song, Beastars - Chorus Proof of Concept

It took me days and restless nights but I think I've managed find a progression that's okay-ish

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

Everywhere I go, I see Beastars...

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 want to make a discord server because I want to share creative stuff with people on a regular basis

Bach's stuff is public domain, but not the recordings. So I remade the Quartet + chopped up the samples for the Beastars Juno song

Working on your thesis with barely any sleep for over a week, and you will start seeing things

The things: