Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

259
Vistas
Using pow in KotlinJS in Intellij

There is a library called kotlin.math which contains a method pow:

import kotlin.math.pow
val factor = pow(10.0, 2)
print(factor)

and result:

100.0

However Intellij is not registering that I have imported the pow function, is there a special pow method for KotlinJS?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

There are two different versions of pow in KotlinJS.

The deprecated kotlin.js.math.pow which is defined as:

public fun pow(base: Double, exp: Double): Double

and the standard library version kotlin.math.pow which is defined as an extension function.

public actual inline fun Double.pow(n: Int): Double = nativeMath.pow(this, n.toDouble())

So your example has to be changed to look like this:

import kotlin.math.pow
val factor = 10.0.pow(2)
print(factor)
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda