DEV Community

mmvergara
mmvergara

Posted on • Edited on

3 1

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!

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay