decorator 25

0905. Training JS #7: if..else and ternary operator

In JavaScript, if..else is the most basic condition statement, it consists of three parts:condition, statement1, statement2, like this: if condition: statementa else: statementb It means that if the condition is true, then execute the statementa, otherwise execute the statementb.If the statementa or statementb more than one line, you need to add { and } at the head and tail of statement in JS, t..

0901. Alan Partridge II - Apple Turnover

Backstory As a treat, I'll let you read part of the script from a classic 'I'm Alan Partridge episode: Lynn: Alan, there’s that teacher chap. Alan: Michael, if he hits me, will you hit him first? Michael: No, he’s a customer. I cannot hit customers. I’ve been told. I’ll go and get some stock. Alan: Yeah, chicken stock. Phil: Hello Alan. Alan: Lynn, hand me an apple pie. And remove yourself from ..