DEV Community 👩‍💻👨‍💻

Mark Matthew Vergara
Mark Matthew Vergara

Posted on • Updated on

Javascript Tagalog - Math.ceil

Ano ngaba ang Math.min sa Javascript?
Math Function siya na lagi i ro-round yung number na binigay papunta sa largest integer. (also i ta-try ni js na i convert ang mga binigay na value as a number if hindi number data-type yung binigay)

console.log( Math.ceil(1.2) ) // 2

console.log( Math.ceil('7.8') ) // 8

console.log( Math.ceil(0.1) ) // 1

console.log( Math.ceil(1.0002) ) // 2

console.log( Math.ceil(-4.004) ) // -4

console.log( Math.ceil('-2.001') ) // -2
Enter fullscreen mode Exit fullscreen mode

NaN kapag nag tinry mo mag pass ng hindi number or any na hindi pwede maconvert as a number

console.log( Math.ceil() ) // NaN
console.log( Math.ceil({}) ) // NaN
Enter fullscreen mode Exit fullscreen mode

More tagalog Javascript Learning Resources:
https://javascript-methods-in-tagalog.vercel.app/

Top comments (1)

Collapse
 
jeffchavez_dev profile image
Jeff Chavez

Get it!

Visualizing Promises and Async/Await 🤯

async await

☝️ Check out this all-time classic DEV post