
Explore JavaScript essentials for Node-RED by learning built-in functions and methods to optimize Node-RED function nodes, with insights from IoT dashboards, PLC data, and MQTT workflows.
Learn to generate random numbers with Math.random, refine with Math.floor and toFixed, and map 0-1 outputs to 0-100 ranges in JavaScript for Node-RED.
Explore declaring variables in JavaScript using var, let, and const. Learn scope rules, redeclaration constraints, and naming conventions like camelCase and underscores for clear, descriptive code.
Explore how JavaScript strings work with single quotes, double quotes, and backticks, and learn escaping with backslashes and newline sequences like \n.
Explore boolean values in JavaScript, using true and false and proper lowercase spelling, and learn how symbols create distinct identities; previews undefined and null in upcoming topics.
Explore undefined and null in Node-RED JavaScript, showing undefined when a variable lacks value, null as an empty but defined value, and how loose versus strict comparisons differ.
Explore the typeof operator to identify data types in JavaScript, including boolean, string, number, undefined, and the null bug; learn safe conversions with Number, String, and Boolean.
Explore arithmetic operators in JavaScript: addition, subtraction, multiplication, division, modulus, and exponentiation. Learn string coercion, concatenation with plus, and prefix/postfix increment and decrement.
Explore logical operators and comparisons using and, or, and not to evaluate true and false conditions, and practice with a Celsius to Fahrenheit conversion exercise.
Build a Node-RED project that converts Celsius to Fahrenheit using a function node and inject node, and display the formatted payload with string concatenation and template literals.
Understand how arrays store multiple values with square brackets, use zero-based indexing, and access, modify, and measure array length. Explore single and multi-dimensional arrays and array methods.
Practice reading and writing Modbus data in Node-RED by connecting to a Modbus server (localhost, port 502), reading holding registers as arrays, and updating values via sliders and dashboards.
Discover essential array methods in JavaScript for Node-RED, including push, pop, shift, splice, concat, find, indexOf, and lastIndexOf, with practical examples of building and manipulating arrays.
Learn string sorting with the sort and reverse functions on arrays of strings, sort from a to z or z to a, and recognize that numbers need a different approach.
Learn numeric array sorting in JavaScript using sort with a minus b for ascending and b minus a for descending, plus faster typed arrays and reverse as an alternative.
Find the minimum and maximum values in an array by sorting. Use the first element for the minimum and the last for the maximum, or length minus one when unknown.
Practice implementing fifo and lifo using arrays by pushing values and observing first in first out and last in first out behavior.
Explore multi dimensional arrays in javascript for Node-RED, including two dimensional and three dimensional arrays, rows and columns, visualizing with console.table, and accessing values by indices.
Explore using a single-dimensional array in Node-RED to model a rack of shelves, mapping indices to locations, and update or empty slots with flow variables and dashboard controls.
Learn to store and retrieve values in a multi-dimensional array using row and column indices, with an update button and row/column/product number variables; previews moving to objects in next video.
Explore how objects define properties and values with a cat example. Access and update properties with dot or bracket notation in JSON within Node-RED.
Create a production status object in Node-RED with line name, manager name, production count, started, and finished, then update count and log to debug window with timestamped start and finish.
Explore combining objects and arrays in JavaScript for Node-RED, including objects inside objects, arrays inside objects, and object in arrays, and access nested properties like country.
Explore building a multi-line data structure by extending project one, using objects and arrays to represent line names, production counts (good and bad), and line health insights.
Explore JavaScript conditional statements in Node-RED, including if, else, else if, switch, and ternary operators. Learn how to test variables and branch actions using payloads, console logs, and examples.
Use else if statements in Node-RED to handle multiple comparisons, outputting tank levels as critically low, low, high, or okay, and illustrate a beer purchase flow with age checks.
Explore a beer purchase workflow in Node-RED, using a dashboard with inputs for age and id, flow variables, a function for purchase rules, and else-if logic to approve or deny.
Explore conditional ternary operators as a one-line alternative to if-else for small conditions, with examples like level is low or level is okay, and preview switch statements next.
Learn how to use the switch statement in JavaScript to handle multiple conditions in Node-RED by mapping error codes to readable messages with cases, break, and a default.
build a rock, paper, scissors game in a node-red dashboard with a dropdown or button for user input, and a random computer choice using math.random and math.floor, tracking five rounds.
Master JavaScript loops, including while, do-while, and for-of, to iterate arrays and objects, push values, and convert between arrays and objects, with practical examples from 0 to 10.
Create a ten-element array of random numbers from 0 to 100 using Math.random, then filter and log values greater than 50 to the console or payload in Node-RED.
Master for loops in JavaScript essentials for Node-RED by learning to run code a set number of times, print 0–10, push numbers into an array, and iterate by steps.
For Node-RED, initialize a 12-element array with random 0–3 values representing prototypes, then use a for loop to count empty slots and green, blue, and brown boxes in the rack.
Learn how break and continue control for loops in JavaScript, stopping a loop when a condition is met and skipping specific iterations, with practical Node-RED examples.
Apply break logic to locate the next empty position and the nearest green, blue, and brown boxes, and build a payload object to display totals and locations.
Learn to manipulate arrays by moving a blue box to the nearest empty location, update the array values, and visualize before-and-after states while practicing for loops.
Master for...of to iterate over array elements and strings with predictable logging, and use for...in to access object keys and values, illustrated with arrays and a sample company object.
Practice for-in loops to print object properties and values, build numeric property sums, and filter numbers with typeof to compute total course costs in Node-RED JavaScript essentials.
Convert objects to arrays with Object.keys, Object.values, and Object.entries to leverage array methods in Node-RED, using for...of loops and console logging for multidimensional arrays.
Learn how to use nested loops to traverse a multi-dimensional array in JavaScript for Node-RED, printing keys and extracting values with for loops and array length.
Explore practice exercises that use for loops, if statements, and arrays to identify courses by price, print names, and build or convert between objects and arrays for payload handling.
Explore how to write and call functions in JavaScript for Node-RED, covering basic syntax, parameters and arguments, arrow functions, scope, and nested functions, with practical examples and exercises.
Write a basic Node-RED function to generate an array of ten random numbers, log it to the console, and learn about scope and simple formatting with toFixed.
Explore how parameters define function inputs and how arguments steer its operation, with examples of price calculations and validation for invalid inputs.
Learn how to validate function parameters with typeof checks for string and number, handle missing arguments, and apply default values in JavaScript for Node-RED.
Create a function that returns an array of random numbers from 0 to 100, using length and precision as parameters, with default behavior when no args are passed.
Learn to implement functions in Node-RED to initialize a 12-element rack with random box types (0–3). Display results in a dashboard and count boxes by type using a parameterized function.
Demonstrates storing a box type (green, blue, brown) into the nearest empty rack location using a store empty function, updating the rack, and throwing an error if none exist.
Design a two-argument function to retrieve a box from a source location and store it in an empty target location. Validate inputs and handle errors to prevent invalid moves.
Explore arrow functions, return values, and variable scope in JavaScript for Node-RED, with practical examples of let, var, and const and how payloads are returned.
Explore nested functions by defining an inner display function inside an outer function that generates a random-number array, and learn how inner scope is restricted to the outer function.
Create JavaScript functions in Node-RED to analyze arrays, convert Celsius to Fahrenheit and millimeter to inches, and compute overall equipment efficiency from availability, performance, and quality.
Master inbuilt JavaScript methods such as console.log, parseInt, parseFloat, and Number to convert strings to numbers, handle mixed input, and use numeric parsing in Node-RED workflows.
Explore array methods like for each, filter, and map to operate on array elements, demonstrating selection, transformation, and logging with practical examples.
Learn essential string methods in JavaScript for Node-RED, including concat or plus, split and join, indexOf and lastIndexOf, slice, replace and replaceAll, and case and position checks like toUpperCase, startsWith.
Explore string methods in JavaScript essentials for Node-RED through two practical exercises: transforming a mixed string to a target format, and capitalizing the first letter of each word.
Master number methods in JavaScript to control decimals with toFixed, ensure precision, and convert results back to numbers using Number or parseFloat, while checking not a number and finite values.
Master built-in math methods to find max and min values in arrays using Math.max, Math.min, and the spread operator; learn when to use reduce for large data sets in Node-RED.
Explore JavaScript math methods in Node-RED, including square root and exponentiation, and learn how to round and truncate decimals with real and negative numbers.
Process numbers in JavaScript by finding largest and smallest values, create a square root array rounded to two decimals, compute the average rounded to nearest whole number, and truncate decimals.
Explore JavaScript date methods in Node-RED, including creating dates, extracting year, month, day, time, and epoch time. Learn to log data with timestamps and format dates for locale or utc.
Explore the exercise solution for Node-RED: generate and log sensor values every second, manage a 100-record data array, compute max, min, and average, and visualize results on a time-based chart.
Are you looking to harness the power of JavaScript within the innovative environment of Node-RED? Whether you're an automation engineer, a developer looking to dive into the Internet of Things (IoT), or an enthusiast eager to explore the intersection of programming and industrial automation, this course is designed for you.
Why JavaScript with Node-RED?
Node-RED, a flow-based development tool for visual programming, has revolutionized the way we interact with hardware and APIs, making it an indispensable tool for automation and IoT projects. JavaScript, with its flexibility and ubiquity, powers Node-RED's functionality, allowing users to create complex flows with minimal effort. Understanding JavaScript is key to unlocking the full potential of Node-RED, enabling you to customize nodes, and functions, and integrate various systems seamlessly.
What You Will Learn:
JavaScript Fundamentals: Start with the basics of JavaScript, including variables, functions, and control structures, ensuring a solid foundation for more advanced topics.
Node-RED Integration: Learn how to apply your JavaScript knowledge in Node-RED, customizing nodes, creating function nodes, and integrating external libraries to extend your flows' capabilities.
Real-World Projects: Apply what you've learned in real-world scenarios, building projects that simulate industrial automation tasks, IoT systems, and more, solidifying your skills through practical application.
Best Practices: Gain insights into coding best practices, debugging techniques, and performance optimization to ensure your Node-RED flows are efficient, maintainable, and scalable.
Who Should Enroll?
This course is ideal for anyone interested in industrial automation, IoT, or looking to expand their programming skills with JavaScript and Node-RED. Whether you're a beginner in programming or an experienced developer new to automation, you'll find valuable insights and skills to take your projects to the next level.
Enroll now and start your path to becoming a Node-RED expert with JavaScript!