Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

JavaScript completing a code JavaScript Math function

dinipascal10

New Coder
Dear Sir,
good evening sir, how are you doing? hope you are doing well. please i am having some difficulties in completing some javascript coding. please can you help me to answer me this questions by completing the code for me.
question number one:-
1) complete the code for the function to display the result of Eulers number to the power of 4.
<p> click the button to display the result of Eulers number to the power of 4.</p>
<button onclick ="mymaxVal(">calculate it</button>
< p id="result"></p>
<script>
function mymaxVal(){
document.getEelementById("result").innerHTML
=.......................
}

2) complete the code for the function to return the cosine value of 9.
<p> click the button to show the cosine value of 9.</p>
<button onclick ="mycos(">calculate it</button>
< p id="result"></p>
<script>
function mycos(){
document.getEelementById("result").innerHTML
=...........................

3)
<p> click the button to display the result of Eulers number to the power of 4.</p>
<button onclick ="myExpVal(">calculate it</button>
< p id="result"></p>
<script>
function myExpVal(){
document.getEelementById("result").innerHTML
=..................................

4)
<p> click the button to display a random number between 1 and 50.</p>
<button onclick ="myRanVal(">Try it</button>
< p id="result"></p>
<script>
function myRanVal(){
Var r = document.getEelementById("result")
r.innerHTML= Math.floor((.................);
}

5)
<p> click the button to round the number 3.7 downward to its nearest interger.</p>
<button onclick ="myfloorVal(">calculate it</button>
< p id="result"></p>
<script>
function myfloorVal(){
document.getEelementById("result").innerHTML
=.........................;

6)
<p> click the button to absolute value of -11.21 </p>
<button onclick ="myAbsVal(">Try it</button>
< p id="result"></p>
<script>
function myAbsVal(){
document.getEelementById("result").innerHTML
=.........................

7)
<p> click the button to display the arctangent of 6/2.</p>
<button onclick ="myArctan() ">calculate it</button>
< p id="result"></p>
<script>
function myArctan(){
alert(.......................................)

8)
<p> click the button to round the number 3.7 to its nearest interger.</p>
<button onclick ="myRndVal(">calculate it</button>
< p id="result"></p>
<script>
function myRndVal(){
document.getEelementById("result").innerHTML
=................................;

Please i will be very grateful if you can help me complete these codes.
thank you for your understanding.
regards
your student,
Dini Pascal
[email protected]
 
Dear Sir,
good evening sir, how are you doing? hope you are doing well. please i am having some difficulties in completing some javascript coding. please can you help me to answer me this questions by completing the code for me.
question number one:-
1) complete the code for the function to display the result of Eulers number to the power of 4.
<p> click the button to display the result of Eulers number to the power of 4.</p>
<button onclick ="mymaxVal(">calculate it</button>
< p id="result"></p>
<script>
function mymaxVal(){
document.getEelementById("result").innerHTML
=.......................
}

2) complete the code for the function to return the cosine value of 9.
<p> click the button to show the cosine value of 9.</p>
<button onclick ="mycos(">calculate it</button>
< p id="result"></p>
<script>
function mycos(){
document.getEelementById("result").innerHTML
=...........................

3)
<p> click the button to display the result of Eulers number to the power of 4.</p>
<button onclick ="myExpVal(">calculate it</button>
< p id="result"></p>
<script>
function myExpVal(){
document.getEelementById("result").innerHTML
=..................................

4)
<p> click the button to display a random number between 1 and 50.</p>
<button onclick ="myRanVal(">Try it</button>
< p id="result"></p>
<script>
function myRanVal(){
Var r = document.getEelementById("result")
r.innerHTML= Math.floor((.................);
}

5)
<p> click the button to round the number 3.7 downward to its nearest interger.</p>
<button onclick ="myfloorVal(">calculate it</button>
< p id="result"></p>
<script>
function myfloorVal(){
document.getEelementById("result").innerHTML
=.........................;

6)
<p> click the button to absolute value of -11.21 </p>
<button onclick ="myAbsVal(">Try it</button>
< p id="result"></p>
<script>
function myAbsVal(){
document.getEelementById("result").innerHTML
=.........................

7)
<p> click the button to display the arctangent of 6/2.</p>
<button onclick ="myArctan() ">calculate it</button>
< p id="result"></p>
<script>
function myArctan(){
alert(.......................................)

8)
<p> click the button to round the number 3.7 to its nearest interger.</p>
<button onclick ="myRndVal(">calculate it</button>
< p id="result"></p>
<script>
function myRndVal(){
document.getEelementById("result").innerHTML
=................................;

Please i will be very grateful if you can help me complete these codes.
thank you for your understanding.
regards
your student,
Dini Pascal
[email protected]
Hi there,
Is this a homework assignment? Have you tried solving the problems and got stuck along the way?
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom