Focus mode

NEAR Developer Course

Assert

AssemblyScript provides a rich environment including an assert function to improve the quality of your code, among others. This is a specific set of functions that throw an error if something unexpected happens. They’re called “assertion” functions.

assert<T>(isTrueish: T, message?: string): T

// usage
let output: i8 = 1;
assert(output == 1, "The value of output is not 1");
left-disk

Programs to Accelerate Your Progress in a Software Career

Join our 4-8 month intensive Patika+ bootcamps, start with the fundamentals and gain comprehensive knowledge to kickstart your software career!

right-cube

Test

Comments

You need to enroll in the course to be able to comment!