3.1: Introduction to Conditional Statements – p5.js Tutorial

This video introduces the idea of a boolean expression and conditional logic in programming.

Next video:

Support this channel on Patreon:


Send me your questions and coding challenges!:

Link to code on Github:


For More p5.js Videos:






15 responses to “3.1: Introduction to Conditional Statements – p5.js Tutorial”

  1. QuemuelBA Avatar

    I find your videos very educating plus your goofy sense of humor is a plus. You got a new subscriber sir! Thanks for sharing the knowledge! Greeting from Finland :).

  2. Anthony Gaff Avatar

    Here to help, mate. It's George Boole. So when you refer to the variable type or the logic, it's Boolean because it's named after him. Took me years to remember that. Typed or wrote the little b for ever. 🙂 Love this vid. Keep it up! Great stuff.

  3. Shehin F N Avatar

    I pray for this man every day 🙂

  4. Tushar Sadhwani Avatar

    I'm surprised how similar js syntax is to Python.

  5. Yosef Bisk Avatar

    This man is tops.

  6. Random Code Avatar

    thanks for all the lessons i got from you, may you live long. thank you!!!!

  7. Nitro Bytez Avatar

    I can't believe how much I learned from watching your videos. I got blasted by my teacher cause I stopped watching his lectures and mentioned that your tutorials made me understand and grasp concepts better.

  8. Arrozkonleche Avatar

    It's hard to find videos like yours!
    Simple and short, it's really gonna help me in my class

  9. Fatin Khawarizmi Avatar

    I believe , that the first little steps, can lead you to the mile, to where is your goals!
    Mrs Daniel, "Thanks = allColorsOfNature ((*_*))"

  10. david leake Avatar

    Great videos, you've definitely earned my subscription. I am an electrical engineering major and I learned C++ and Assembly through my major, but I'm working on learning some JS on my break and your videos are great! My only question is: how flexible is knowledge of p5? If I learn p5, is it easy to transition to other java libraries?

  11. Christopher Clements Avatar

    what if you defined a variable "var 5 = 7" :p

  12. Karl Gustav Avatar

    Yeah my first little self programmed game!!!
    Thx for this nice tutorials!!

    var eli = {
    h: 200,
    w: 100
    var ang = 0
    var circ = {
    x: 200,
    y: 100,
    r: 100
    var Xstart = circ.x
    var Ystart = circ.y
    var hstart = eli.h
    var wstart = eli.w

    function setup() {

    function draw() {
    if ((mouseX – circ.x) * (mouseX – circ.x) + (mouseY – circ.y) * (mouseY -circ.y) * eli.w / eli.h * eli.w / eli.h <= eli.w * eli.w/4 ){
    circ.x = Xstart + circ.r * sin(ang)
    circ.y = Ystart + circ.r – circ.r * cos(ang)
    eli.h = eli.h – eli.h/1000
    eli.w = eli.w – eli.w/1000
    ang = ang + 0.01
    if ((mouseX – circ.x) * (mouseX – circ.x) + (mouseY – circ.y) * (mouseY -circ.y) * eli.w / eli.h * eli.w / eli.h > eli.w * eli.w/4 ){
    circ.x = 200
    circ.y = 100
    hstart = 100
    wstart = 100
    ang = 0

  13. Pickens Incorporated Avatar

    If anybody wants to know about finding distance, I highly recommend watching Brackey's "programmer math" video on Vectors.

    Thanks, oh and by the way, I should mention in case you weren't aware, Daniel, that Goldsmiths University linked your video tutorials in there optional pre-induction work, as this is what we will be using in the first year, so in case you've gotten or will get a sudden increase in traffic, there's your answer, haha.

  14. Andrew Young Avatar

    I know I'm late to the party, but you're doing an amazing job teaching this material. I'll be watching all of your p5 tutorials. And Sub'd. Because why not.

  15. άλβερτος Σήθ Avatar

    I love your videos man , and the way you explain things make them quite clear. But i believe that in order to get good and advance in programming you need to DYI , so i suggest you give us a challenge at the end of videos. Thanks for all the lessons , and please continue!

Leave a Reply

Your email address will not be published. Required fields are marked *