To code this project you need to know: Console, Comments, Data Types, Arithmetic Operators, String Concatenation, Properties, Methods, Built-in Objects
If you are not familier with them download Learn JavaScript eBook from (https://codingwithbasir.com/learn-javascript)
- Create a html file with your name like john.html
- Add current code to that file:
<!DOCTYPE html>
<html>
<body>
<script>
// your code here
</script>
</body>
</html>
- Use console.log to log these info in the console.
Subject | Full Marks | Pass Marks | Obtained |
---|---|---|---|
Math | 100 | 50 | 80 |
Science | 100 | 50 | 60 |
Computer | 100 | 50 | 40 |
Average | 60 |
Note:
- No need to show lines
- Do not use variables
- Average can not be 60 itself. use + operator to sum marks and / operator to calculate the average.
- User
\t
to make space between columns. First line would be like this:
console.log("Subjects \t Full Marks \t Pass Marks \t Obtained");