Computer Science, asked by Pratibhasingh1922, 2 months ago

How to make translateY() function in JS ?

Answers

Answered by pokemonpikachu47
3

Answer:

A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output.

Answered by AngeIianDevil
42

ʏᴏᴜ ᴄᴀɴ ᴘᴀss ᴀɴʏ ᴛʀᴀɴsғᴏʀᴍ ᴘʀᴏᴘᴇʀᴛʏ ᴀs ᴀ sᴛʀɪɴɢ.

\Large\mathtt\green{ }\huge\underline\mathtt\red{Answer : }

ʜᴏᴡ?

ɪᴛ ᴄᴀɴ ʙᴇ ᴅᴏɴᴇ ʟɪᴋᴇ ᴛʜɪs;

ᴅɪᴠ.sᴛʏʟᴇ.ᴛʀᴀɴsғᴏʀᴍ = "ᴛʀᴀɴsʟᴀᴛᴇ(x,ʏ)"

ɪ ғɪɴᴅ ᴏᴜᴛ ᴛʜᴀᴛ ɪғ ɪ ᴡʀɪᴛᴇ

ᴅɪᴠ.sᴛʏʟᴇ.ᴛʀᴀɴsғᴏʀᴍ = "ᴛʀᴀɴsʟᴀᴛᴇ(sᴏᴍᴇᴠᴀʟᴜᴇ)"

ɪᴛ ᴏɴʟʏ ᴀғғᴇᴄᴛs x ᴀxᴇs.

"ᴛʀᴀɴsʟᴀᴛᴇ-ʏ(sᴏᴍᴇᴠᴀʟᴜᴇ)" ᴏʀ "ᴛʀᴀɴsʟᴀᴛᴇ-x(sᴏᴍᴇᴠᴀʟᴜᴇ)"

ᴅɪᴅ ɴᴏᴛ ᴡᴏʀᴋ ᴏᴜᴛ.

ᴏʀ ʏᴏᴜ ᴄᴀɴ ᴜsᴇ ʀᴏᴛᴀᴛᴇ ᴘʀᴏᴘᴇʀᴛʏ;

ᴅɪᴠ.sᴛʏʟᴇ.ᴛʀᴀɴsғᴏʀᴍ = "ʀᴏᴛᴀᴛᴇ(50ᴘx

_______________________________

Similar questions