What will be the equivalent output of the following JavaScript code snippet? x = ~-y; w = x = y = z; q = a?b:c?d:e?f:g;
1.x = ~(-y); w = (x = (y = z)); q = a?b:(c?d:(e?f:g));
2.x = a?b:(c?d:(e?f:g)); q = ~(-y); w = (x = (y = z));
3.x = (x = (y = z));w = ~(-y); q = a?b:(c?d:(e?f:g));
4.x = ~(-y); w = (x = (y = z)); q = (c?d:(e?f:g));
What will be the output of the following JavaScript code? <p id="demo"></p> <script> function myFunction() { document.getElementById("demo").innerHTML = Math.cbrt(125); } </script>
1.125
2.25
3.5
4.Error
What will be the output of the following JavaScript code? string a = â€hiâ€; string b =â€thereâ€; alert(a+b);
1. hi
2.there
3.hithere
4.undefined
An expression that can legally appear on the left side of an assignment expression.†is a well known explanation for variables, properties of objects, and elements of arrays. They are called ___________
1.Properties
2.Prototypes
3.Lvalue
4.Definition
What will be the output of the following JavaScript code? <p id="demo"></p> <script> function myFunction() { document.getElementById("demo").innerHTML = Math.abs(-7.25); } </script>
1.7.25
2.-7.25
3.7
4. -7
What will be the output of the following JavaScript code? <p id="demo"></p> <script> function myFunction() { document.getElementById("demo").innerHTML = Math.acos(0.5); } </script>
1.1.01
2.1.047
3.1.00
4. 1.4
What will be the output of the following JavaScript code? function height() { var height = 123.56; var type = (height>=190) ? "tall" : "short"; return type; }
1.123.56
2.190
3.tall
4.short
What will be the output of the following JavaScript code? function output(object) { var place=object ? object.place : “Italyâ€; return “clean:â€+ place; } console.log(output({place:India}));
1. clean:India
2.clean:Italy
3.error
4.undefined
What will be the output of the following JavaScript code? function output(option) { return (option ? “yes†: “noâ€); } bool ans=true; console.log(output(ans));
1.Yes
2.No
3.Runtime error
4. Compilation error