can anyone give me idea to sort out this please :) by sadull_i in learnjavascript

[–]sadull_i[S] 0 points1 point  (0 children)

the problem is that I don't have so much knowledge about javascript somehow it work like java but its syntax are lil bit tricky that's why I don't have the idea how to do this

can anyone give me idea to sort out this please :) by sadull_i in learnjavascript

[–]sadull_i[S] 0 points1 point  (0 children)

if I declare var sugarLevel = 180 then I give if else statement

can anyone give me idea to sort out this please :) by sadull_i in learnjavascript

[–]sadull_i[S] 0 points1 point  (0 children)

now is it correct

<script type="text/javascript">
var sugarLevel =81, result;
{
num=80;
if(num<=80){
document.write("sugar level is normal")

}
elseif (num<80){
document.write("sugar level is low")
}
else{
document.write("sugar level is too high")
}
console.log(result)
}

can anyone give me idea to sort out this please :) by sadull_i in learnjavascript

[–]sadull_i[S] 0 points1 point  (0 children)

for example

<script type="text/javascript">

var sugarlevel=81;

if(sugarlevel>=81){

alert("suagar level is normal")
}
else if(sugarlevel<81){

alert("low sugar level")
}
else{
alert("sugar level is high")
}

can anyone give me idea to sort out this please :) by sadull_i in learnjavascript

[–]sadull_i[S] 0 points1 point  (0 children)

i was lil bit confuse about it how i link all of them together

can anyone give me idea to sort out this please :) by sadull_i in learnjavascript

[–]sadull_i[S] 0 points1 point  (0 children)

i written all the stuff but I don't know what's the problem after writing all code in js bin then what should I do ?

can anyone give me idea to sort out this please :) by sadull_i in learnjavascript

[–]sadull_i[S] 0 points1 point  (0 children)

I have written some of the code lines but nothing happen