001let age = 53;
002
003
004
005
006console.log(age++);
007
008console.log(age);
009
010age--;
011console.log(age);
012
013
014
015if(age > 18)
016{
017 console.log("You can buy a drink in the pub");
018}
019else if(age>=5)
020{
021 console.log("You can ask your parents to buy you a soft drink");
022}
023else
024{
025 console.log("Sorry, you can't come in!");
026}
027
028
029
030
031
032if(age>=5)
033{
034 console.log("You can ask your parents to buy you a soft drink");
035}
036else if(age > 18)
037{
038 console.log("You can buy a drink in the pub");
039}
040else
041{
042 console.log("Sorry, you can't come in!");
043}
044
045
046
047let string = "20";
048let number = 20;
049
050console.log(string==number);
051
052
053console.log(string===number);
054
055let string2 ='';
056let number2 = 0;
057
058
059
060if(age > 18 && age < 21)
061{
062 console.log("There is a free drink for you at the bar!");
063}
064else if(age > 18)
065{
066 console.log("You can buy a drink in the pub");
067}
068else if(age>=5)
069{
070 console.log("You can ask your parents to buy you a soft drink");
071}
072else
073{
074 console.log("Sorry, you can't come in!");
075}
076
077let overdrawn = false;
078if(!overdrawn)
079{
080 console.log("You can withdraw cash");
081}
082
083
084let outputString = ''
085outputString = (overdrawn===false)? "you can withdraw" : "No cash for you";
086console.log(outputString);
087